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 https://api.bigcommerce.com/stores/{store_hash}/v3/payments/access_tokensRequest
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. The token is valid for one hour.
Required Fields
- order_id
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
Body
orderobject
required
example-1
Response
Payment access token has been successfully created.
Body
dataobject