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.
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 /stores/{store_hash}/v3/payments/access_tokens
Request
This endpoint provides the capability to create a payment access token. The payment access token is required when making request to Payment API for submitting payment for an order.
After the token is created, use the token to Process Payments.
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
orderobject
required
example-1
{ "order": { "id": 1, "is_recurring": false } }
Response
Payment access token has been successfully created
Body
dataobject
metaobject
Response metadata.
example-1
{ "data": { "id": "eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MTUyNTA3NTksIm5iZiI6MTYxNTI0Nz E1OSwiaXNzIjoicGF5bWVudHMuYmlnY29tbWVyY2UuY29tIiwic3ViIjoieHNsM3 JoZGYzNiIsImp0aSI6IjNhOGE3NTJjLTBmNWQtNDNmNS05MzdjLTRhMTYzODBlMW YwZCIsImlhdCI6MTYxNTI0NzE1OSwiZGF0YSI6eyJzdG9yZV9pZCI6IjEwMDEzMz YzMjQiLCJvcmRlcl9pZCI6IjE2NiIsImFtb3VudCI6NDU3OTAsImN1cnJlbmN5Ij oiVVNEIn19.dpCDgOfbNrz095VARY20yYBRTOuq-W1F0ETTgf1Zhbs" }, "meta": {} }