For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Dev Portal
DocsAPI ReferenceLearnCommunityChangelog
DocsAPI ReferenceLearnCommunityChangelog
    • About Our APIs
  • REST
    • Overview
      • Overview
      • Payments
          • Stored Instruments (Beta)
        • Methods
          • Transactions (Beta)
            • POSTCreate Purchase Transaction
            • POSTCreate Authorization Transaction
  • GraphQL
    • Overview
  • MCP
    • Overview
Dev Portal
LogoLogo
RESTAdminPaymentsTransactions (Beta)

Create Purchase Transaction

Beta
POST
https://api.bigcommerce.com/stores/:store_hash/v3/payments/transactions/purchases
POST
/stores/:store_hash/v3/payments/transactions/purchases
$curl -X POST https://api.bigcommerce.com/stores/store_hash/v3/payments/transactions/purchases \
> -H "X-Auth-Token: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "order_id": "123",
> "payment_method_id": "stripeupe.card",
> "provider_transaction_id": "pi_************",
> "result": "PAID",
> "is_test": false,
> "status": "COMPLETE",
> "provider_data": {
> "mandate_method_id": "sample_method_id",
> "override_method_id": "sample_override_method_id"
> },
> "payment_instrument": {
> "card": {
> "type": "CARD",
> "issuer_identification_number": "234324",
> "last4": "4242",
> "brand": "VISA",
> "expires": {
> "month": 12,
> "year": 2030
> }
> }
> },
> "avs_result": {
> "code": "Y",
> "message": "Address and postal code match",
> "street_match": "Y",
> "postal_match": "Y"
> },
> "cvv_result": {
> "code": "M",
> "message": "CVV matches"
> }
>}'
1{
2 "id": "0ce6ec58-e731-497c-b4f2-51e65950ea42"
3}
Creates a new purchase payment transaction.
Was this page helpful?
Previous

Transactions API (Beta)

Next

Create Authorization Transaction

Built with

Authentication

X-Auth-Tokenstring

BigCommerce Admin API token sent in the X-Auth-Token header.

Path parameters

store_hashstringRequired
Permanent ID of the BigCommerce store.

Request

This endpoint expects an object.
order_idstringRequiredformat: "^[1-9]\d*$"
ID of the order for this transaction. Must be a numeric string representing a positive integer greater than 0.
payment_method_idstringRequired>=1 character

Gateway and method key in format {provider}.{method}.

provider_transaction_idstringRequired>=1 character
Transaction ID from the payment provider
resultenumRequired
Outcome of the provider operation for a purchase transaction.
Allowed values:
is_testbooleanOptionalDefaults to false
Whether this is a test transaction
statusenumOptional

Operational state of the transaction record. Currently only COMPLETE is supported for creating transactions. Additional statuses will be supported in future releases.

Allowed values:
provider_datamap from strings to stringsOptional
Additional data from the payment provider. Accepted keys vary by provider.
payment_instrumentobjectOptional
Details of the payment instrument used.
avs_resultobjectOptional

Address Verification System (AVS) result returned by the payment provider.

cvv_resultobjectOptional

Card Verification Value (CVV) result returned by the payment provider.

Response

Purchase transaction created successfully
idstringformat: "uuid"
Unique identifier for the created transaction

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
412
Precondition Failed Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error