Payment Actions
Capture order payment
POST https://api.bigcommerce.com/stores/{store_hash}/v3/orders/{order_id}/payment_actions/captureRequest
Capture the payment for an order. When there are no payment method validation issues, the capture process is successful, the payment_status
updates to capture pending
, and the payment request is scheduled. The payment request itself occurs asynchronously.
Requires at least one of the following scopes:
store_v2_orders
store_v2_transactions
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- order_id in path - integerrequired
The ID of the
Order
to which the transactions belong. - Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Response
Body
example
Void
POST https://api.bigcommerce.com/stores/{store_hash}/v3/orders/{order_id}/payment_actions/voidRequest
Void the payment for an order. When there are no payment method validation issues, the void process is successful, the payment_status
updates to void pending
, and the void payment request is scheduled. The payment request itself occurs asynchronously.
Requires at least one of the following scopes:
store_v2_orders
store_v2_transactions
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- order_id in path - integerrequired
The ID of the
Order
to which the transactions belong. - Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Response
Body
example
Create a Refund Quote
POST https://api.bigcommerce.com/stores/{store_hash}/v3/orders/{order_id}/payment_actions/refund_quotesRequest
Calculate the tax amount, total refund amount and get available payment options for an order refund by providing items and costs or quantities to refund.
Requires at least one of the following scopes:
store_v2_orders
store_v2_transactions
Notes:
- Create a refund quote before performing a refund request to best avoid a
422
error. Check the refund quote's response body for therefund_methods
array. Theamount
given in the array must match theamount
used in the refund request body. - Order refunds should be processed sequentially. Processing multiple concurrent refunds on the same order is not yet supported.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- order_id in path - integerrequired
The ID of the
Order
to which the transactions belong. - Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Body
itemsarray[]
required
Body
itemsarray[]
required
example
Response
Body
dataobject
example
Create a Refund
POST https://api.bigcommerce.com/stores/{store_hash}/v3/orders/{order_id}/payment_actions/refundsRequest
Creates a refund. When there are no payment method validation issues, the refund process is successful and the refund payment request is scheduled. The payment request itself occurs asynchronously.
Requires at least one of the following scopes:
store_v2_orders
store_v2_transactions
Note: Order refunds should be processed sequentially. Processing multiple concurrent refunds on the same order are not yet supported.
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- order_id in path - integerrequired
The ID of the
Order
to which the transactions belong. - transaction_id in query - stringFilters by refund payment using the BigCommerce
transaction_id
. - Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Body
itemsarray[]
requiredpaymentsarray[object]
requiredmerchant_calculated_overrideobject
Merchant explicitly provided override based on their own calculation.
This override gives merchants the flexibility to
- bypass any tax correction due to tax rate/providers changes between when a customer places an order and a merchant initiates a refund
- use explicit values calculated by external systems (e.g., merchants' own Extended Producer Responsibility or Order Management System)
Note: when using the override, BC internal tax based refund calculation is skipped and therefore order/taxes records are not updated.
example
Response
Body
dataobject
example
Get Refunds for Order
GET https://api.bigcommerce.com/stores/{store_hash}/v3/orders/{order_id}/payment_actions/refundsRequest
Returns a list of refunds ordered by refund ID in ascending order for the given order.
Requires at least one of the following scopes:
store_v2_transactions_read_only
store_v2_transactions
store_v2_orders_read_only
store_v2_orders
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- order_id in path - integerrequired
The ID of the
Order
to which the transactions belong. - transaction_id in query - stringFilters by refund payment using the BigCommerce
transaction_id
.
example
Response
Body
dataarray[object]
Collection of Refunds
example
Get a Refund
GET https://api.bigcommerce.com/stores/{store_hash}/v3/orders/payment_actions/refunds/{refund_id}Request
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- refund_id in path - integerrequiredRefund ID.
example
Response
Body
dataobject
Example
Get All Refunds
GET https://api.bigcommerce.com/stores/{store_hash}/v3/orders/payment_actions/refundsRequest
Returns a list of refunds ordered by refund ID in ascending order.
Requires at least one of the following scopes:
store_v2_transactions_read_only
store_v2_transactions
store_v2_orders_read_only
store_v2_orders
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- order_id:in in query - arrayPass a comma-separated list of order IDs to filter the included orders. Accepts multiple values.Type: array[integer]
- id:in in query - arrayPass a comma-separated list of refund IDs to filter the included refunds. Accepts multiple values.Type: array[integer]
- created:min in query - string
Filter results so they are later than or equal to provided date.
Must be in url-encoded RFC 3339 format. e.g.
2020-01-15T01:02:34-01:00
is RFC 3339 format. Url-encoded this will be2020-01-15T01%3A02%3A34%2B01%3A00
- created:max in query - string
Filter results so they are earlier than or equal to provided date.
Must be in url-encoded RFC 3339 format. e.g.
2020-01-15T01:02:34-01:00
is RFC 3339 format. Url-encoded this will be2020-01-15T01%3A02%3A34%2B01%3A00
- transaction_id in query - stringFilters by refund payment using the BigCommerce
transaction_id
. - page in query - integerSpecifies the page number in a limited (paginated) list of items.
- limit in query - integerControls the number of items per page in a limited (paginated) list of items.
example
Response
Body
dataarray[object]
Collection of Refunds