Your OAuth credentials include an access key ID and an access key secret. They correspond to an OAuth 2.0 client ID and a client secret respectively.
To exchange these credentials for an access token, call the Request an access token endpoint. Authenticate using basic authentication, with your access key ID as the username and your access key secret as the password.
| Environment | Authorization server |
|---|---|
| Sandbox | https://{prefix}.access.sandbox.checkout.com/connect/token |
| Production | https://{prefix}.access.checkout.com/connect/token |
curl --location 'https://{prefix}.access.checkout.com/connect/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id=ack_...' \
--data-urlencode 'client_secret=...'
The token server returns a Bearer access_token in JSON Web Token (JWT) format. Use this token in the Authorization header of your API requests.
curl --location --request POST 'https://{prefix}.api.checkout.com/{{path}}' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{AccessToken}}' \
--data-raw '{
"amount": 10000,
"currency": "USD",
"reference": "Visa-USD-Test",
...
}'
The expires_in field in the response indicates the validity period of your access token in seconds. When your token expires, you must request a new one.
Depending on the Environment against which you're making your requests against you'll need to request the token from a different Authorization Server.
| Environment | Authorization Server |
|---|---|
| Sandbox | https://{prefix}.access.sandbox.checkout.com/connect/token |
| Production | https://{prefix}.access.checkout.com/connect/token |
Your base URL {prefix} is unique. To learn how to retrieve your unique base URLs for the sandbox and production environments, see API endpoints.
Security Scheme Type: OAuth2
Flow type: clientCredentials
Token URL: string
Scopes:
vault - Access to all Vault resourcesvault:apme-enrollment - Manage Apple Pay Domain Enrollmentvault:customers - Manage customersvault:card-metadata - Read card metadatavault:instruments - Create instrumentsvault:network-tokens - Manage network tokensvault:tokenization - Tokenize payment instrumentsvault:real-time-account-updater - Access to real-time account updatergateway - Access to all Gateway resourcesgateway:payment - Request paymentsgateway:payment-details - Get payment detailsgateway:payment-authorizations - Increment authorizationsgateway:payment-voids - Void paymentsgateway:payment-captures - Capture paymentsgateway:payment-contexts - Manage payment contextsgateway:payment-cancellations - Manage payment cancellationsgateway:payment-refunds - Refund paymentsfx - Foreign exchange servicespayouts:bank-details - Get bank detailssessions:app - App-based authenticationsessions:browser - Browser-based authenticationdisputes - Access to all Disputes resourcesdisputes:view - View disputesdisputes:provide-evidence - Provide dispute evidencedisputes:accept - Accept disputesdisputes:scheme-files - Read dispute scheme filesaccounts - Manage sub-entitiesflow - Access to all Flow resourcesflow:workflows - Manage workflowsflow:events - Retrieve eventsflow:reflow - Manage workflowsfiles - Access to all Files resourcesfiles:retrieve - Retrieve filesfiles:upload - Upload filesfiles:download - Download filesforward - Access to Forward apiforward:secrets - Manage secrets in Forward apibalances - Access to all Balances resourcesbalances:view - View balancesbalances:top-up-instructions - Get top-up instructionstransfers - Access to all Transfers resourcestransfers:view - View transferstransfers:create - Create transfersmiddleware - Access to all Middleware resourcesmiddleware:merchants-secret - Allows merchant identity and Middleware token exchange from a secure execution environmentmiddleware:merchants-public - Allows merchant identity and Middleware token exchange from an insecure execution environmentpayment-sessions - Access to all Payment Sessions resourcespayments:search - Search paymentsreports - Access to all Reports resourcesreports:view - View reportsfinancial-actions - Access to all Financial actions resourcesfinancial-actions:view - View financial actionscard-management - Access to all Card management resourcesissuing:card-management-read - Gives access to card management endpoints with GET operationsissuing:card-management-write - Gives access to card management endpoints with POST/ PUT / DELETE operationsissuing:controls-read - Gives access to card control endpoints with GET operationsissuing:controls-write - Gives access to card control endpoints with POST/ PUT / DELETE operationstransactions - Access to all transactions resourcesissuing:transactions-read - Gives access to get and search transactionsissuing:transactions-write - Gives access to simulate transactions for testing purposesissuing-disputes - Access to Issuing disputes resourcesissuing:disputes-read - Gives access to get disputesissuing:disputes-write - Gives access to create and submit Issuing disputesidentity-verification - Access to all Identities endpointsPayment Context - Read payment contextagentic:inventory - Manage agentic commerce inventory and reservations