FILTER BY TAG
Limited Availability

Send API Request on Behalf of Merchant

After you receive an access token, you can send API requests on-behalf of the merchant using OAuth 2.0. When you send a request, include the access token in the
Authorization
header as a bearer token.
IMPORTANT
Not all
Cybersource
APIs support OAuth 2.0. For an up-to-date list of the APIs that do support OAuth 2.0, contact customer support.

Sending an OBO Request

To send an API request on-behalf of a merchant, set the
Authorization
header element in the JWT to the access token value. Format the access token value as a bearer token. For more information about constructing JWTs for API requests, see Construct Messages Using JSON Web Tokens in the
Getting Started with REST Developer Guide
.
Example: JWT Authorization Header Element
--header 'Authorization: 'Bearer <access_token>' \
Set
&lt;access_token&gt;
to the access token or refresh token value.
Test API Request Example
curl --request POST \ --url https://api-matest.cybersource.com/pts/v2/payments \ --header 'Authorization: Bearer <access_token>' \ --header 'content-type: application/json' \ --data '{ API_request_message }'
Production API Request Example
curl --request POST \ --url https://api-ma.cybersource.com/pts/v2/payments \ --header 'Authorization: Bearer <access_token>' \ --header 'content-type: application/json' \ --data '{ API_request_message }'
IMPORTANT
These request examples only display the OAuth header information. For request body examples, see the REST API Reference on the Developer Center.

Next Step

Your access token is valid for fifteen minutes. When the access token expires, you can use the refresh token to request a new access and refresh token. Use the new access token to continue sending requests on-behalf of the merchant, and it. For more information about requesting a new access and refresh token, see Renew Access and Refresh Token.