Docs
Management API
Payment Actions

Payment Actions

Capture order payment

POST /orders/{order_id}/payment_actions/capture

Request

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
    required

Parameters

  • store_hash in path - string

Response

Resource Created.

Body

object | application/json

    example

    Void

    POST /orders/{order_id}/payment_actions/void

    Request

    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
      required

    Parameters

    • store_hash in path - string

    Response

    Resource Created.

    Body

    object | application/json

      example

      Create a Refund Quote

      POST /orders/{order_id}/payment_actions/refund_quotes

      Request

      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 the refund_methods array. The amount given in the array must match the amount used in the refund request body.
      • Order refunds are processed consecutively. Processing synchronous refunds on an order is not yet supported.

      Authentication

      • X-Auth-Token in header
        required

      Parameters

      • store_hash in path - string

      Body

      object | application/json

      Request body for refund quotes.

      • items
        array[]
        required

      Body

      object | multipart/form-data

      Request body for refund quotes.

      • items
        array[]
        required

      example

      Response

      Body

      object | application/json
      • data
        object

      • meta
        object

        Response metadata.

      example

      Create a Refund

      POST /orders/{order_id}/payment_actions/refunds

      Request

      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 are processed consecutively. Processing synchronous refunds on an order are not yet supported.

      Authentication

      • X-Auth-Token in header
        required

      Parameters

      • store_hash in path - string
      • transaction_id in query - string

        Filters by refund payment using the BigCommerce transaction_id.

      Body

      object | application/json

      Request body for refund requests.

      • items
        array[]
        required

      • payments
        array[object]
        required

      • merchant_calculated_override
        object

        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

      object | application/json
      • data
        object

      • meta
        object

        Response metadata.

      example

      Get Refunds for Order

      GET /orders/{order_id}/payment_actions/refunds

      Request

      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
        required

      Parameters

      • store_hash in path - string
      • transaction_id in query - string

        Filters by refund payment using the BigCommerce transaction_id.

      example

      Response

      Body

      object | application/json

      Response payload for Refund resource.

      • data
        array[object]

        Collection of Refunds

      • meta
        object

        Response metadata.

      example

      Get a Refund

      GET /orders/payment_actions/refunds/{refund_id}

      Request

      Returns a refund by refund ID.

      Authentication

      • X-Auth-Token in header
        required

      Parameters

      • store_hash in path - string
      • refund_id in path - integer
        required

        Refund ID.

      example

      Response

      Body

      object | application/json
      • data
        object

      • meta
        object

        Response metadata.

      Example

      Get All Refunds

      GET /orders/payment_actions/refunds

      Request

      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
        required

      Parameters

      • store_hash in path - string
      • order_id:in in query - array

        Pass a comma-separated list of order IDs to filter the included orders. Accepts multiple values.

        Type: array[integer]
      • id:in in query - array

        Pass 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 be 2020-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 be 2020-01-15T01%3A02%3A34%2B01%3A00

      • transaction_id in query - string

        Filters by refund payment using the BigCommerce transaction_id.

      • page in query - integer

        Specifies the page number in a limited (paginated) list of items.

      • limit in query - integer

        Controls the number of items per page in a limited (paginated) list of items.

      example

      Response

      Body

      object | application/json

      Response payload for Refund resource.

      • data
        array[object]

        Collection of Refunds

      • meta
        object

        Response metadata.

      example

      Did you find what you were looking for?