FILTER BY TAG

Create a Token with a Request ID

This section describes how to create tokens using a request ID from a successful payment request. You can use this API to create instrument identifiers, payment instruments, customer, and shipping address tokens in a single request.
IMPORTANT
The
tokenize
API requires message-level encryption (MLE). You must encrypt the payload using an encrypted JWT to send requests. For information about MLE, see
How to Set up REST
in the Getting Started with REST Developer Guide and follow the steps based on your integration method.

Endpoint

Test:
POST
https://apitest.cybersource.com
/tms/services/v1/payments/{requestID}/tokenize
Production:
POST
https://api.cybersource.com
/tms/services/v1/payments/{requestID}/tokenize
Production in India:
POST
https://api.in.cybersource.com
/tms/services/v1/payments/{requestID}/tokenize
Production in Saudi Arabia:
POST
https://api.sa.cybersource.com
/tms/services/v1/payments/{requestID}/tokenize
Test in Saudi Arabia:
POST
https://apitest.sa.cybersource.com
/tms/services/v1/payments/{requestID}/tokenize
{requestID}
is the request ID that is returned in the response of a successful payment request.

Required Fields for Creating a Token with a Request ID

Set to
TOKEN_CREATE
.
Required when you are creating a customer token.
Required when you are creating an instrument identifier token.
Required when you are creating a shipping address token.
Required when you are creating a payment instrument.

REST Example: Creating a Token with a Request ID Identifier

Request
{ "processingInformation": { "actionList": [ "TOKEN_CREATE" ], "actionTokenTypes": [ "instrumentIdentifier", "paymentInstrument", "customer", "shippingAddress" ] } }
Response to a Successful Request
{ "paymentInformation": { "card": { "type": "001" } }, "tokenInformation": { "instrumentIdentifierNew": false, "customer": { "id": "4DC6BB4C7353F90CE063AF598E0AEBE8" }, "instrumentIdentifier": { "id": "7034450000295211111", "state": "ACTIVE" }, "paymentInstrument": { "id": "4DC6C33114B31665E063AF598E0A87FF" }, "shippingAddress": { "id": "4DC6BF33FF03FB70E063AF598E0A1472" } } }