BigCommerce
Payments API
Create Access Tokens

Payment Access Token

The Payments API processes payments using payment instruments such as credit cards or PayPal accounts. To learn more about Payments, see the Payments Overview.

BigCommerce payments requests require a Payment Access Token, or PAT, which is a single use BigCommerce-generated JWT that's tied to the particular order for which the shopper authorizes BigCommerce to submit a payment.

To get a valid PAT, submit the order number to the Create a Payment Access Token endpoint. Authenticate using an API account access token with the Create payments scope as the value of the X-Auth-Token header.

You can also generate a PAT during checkout by using the completeCheckout mutation in the GraphQL Storefront API.

For a guide through the API call sequence needed to create a PAT and make charges, see the Payments Overview.

To learn more about authenticating Payments endpoints, locate the Authentication section at the top of each endpoint, then click Show Details.

Resources

Webhooks

Additional Payments endpoints

Create Payment Access Token

POST /payments/access_tokens

Request

Use this endpoint to create a payment access token. A payment access token is required to process payments with the BigCommerce API.

You can also generate a payment access token during checkout by using the completeCheckout mutation in the GraphQL Storefront API.

After the token is created, use the token to Process a payment.

Required Fields

  • order_id

Authentication

  • X-Auth-Token in header - required

Parameters

  • store_hash in path - string
  • Content-Type in header with default of application/json - string - required

    The MIME type of the request body.

Body

object | application/json
  • order
    object
    required

example-1

Response

Payment access token has been successfully created.

Body

object | application/json
  • data
    object

  • meta
    object

    Response metadata.

example-1

Did you find what you were looking for?