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://api.smartpayfuse-test.barclaycard
/tms/services/v1/payments/{requestID}/tokenize
Production:
POST
https://api.smartpayfuse.barclaycard
/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

processingInformation.actionList
Set to
TOKEN_CREATE
.
processingInformation.actionTokenTypes.customer
Required when you are creating a customer token.
processingInformation.actionTokenTypes.instrumentIdentifier
Required when you are creating an instrument identifier token.
processingInformation.actionTokenTypes.shippingAddress
Required when you are creating a shipping address token.
processingInformation.actionTokenTypes.paymentInstrument
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" } } }