On This Page
pilot
Submit API Requests Using OAuth
You can submit API requests on behalf of the merchant using the access token. The access
token expires after 15 minutes.
Include the access token in the
Authorization
header as shown below.IMPORTANT
Not all API endpoints are currently enabled for OAuth. For a list
of OAuth-enabled endpoints, contact
Cybersource
support: Example: Authorization Header with Access Token
Authorization: Bearer eyJraWQiOiIyNmRjfjVkZTdlMmYwYTI0ODg0MjU1YjIwZWJjMGY0MSIsImFs curl -X POST -H "Authorization: Bearer ACCESS_TOKEN""https://api-ma.cybersource.com/pts/v2/payments"
Error Response
If the token is expired or the user is unauthorized, the API responds with a 401 HTTP status
code.
Expired Token
{ "response": { "rmsg": { "error":"ACCESS_TOKEN_EXPIRED", "error_description":"ACCESS_TOKEN_EXPIRED } } }
Unauthorized Partner
{ "response": { "rmsg": { "error": "UNAUTHORIZED_PARTNER", "error_description": "UNAUTHORIZED_PARTNER" } } }