On This Page
Generate Payment Credentials
This section describes how to generate and retrieve network token payment credentials
such as:
- Network token value
- Cryptogram (Visa and Mastercard only)
- Dynamic card verification value (CVV) (American Express only)
Network token payment credentials are returned as a JSON web encryption (JWE)
response.
You can use the payment credentials API to retrieve the payment credentials for an
existing customer, payment instrument, instrument identifier or tokenized card. For
information about these token types, see these topics:
Prerequisites
You must have the payment credentials service enabled for the
TMS
vault from which the network token is retrieved. For
information on how to enable the payment credentials service, see Token Vault Management.You must have a message-level encryption (MLE) key from the
Business Center
to retrieve network token data. For information on how to create an MLE key, see
Token Management Message-Level Encryption Keys.Endpoint
Test:
POST
https://apitest.cybersource.com
/tms/v2/tokens/{tokenId}/
payment-credentialsProduction:
POST
https://api.cybersource.com
/tms/v2/tokens/{tokenId}/
payment-credentialsProduction in India:
POST
https://api.in.cybersource.com
/tms/v2/tokens/{tokenId}/
payment-credentialsProduction in Saudi Arabia:
POST
https://api.sa.cybersource.com
/tms/v2/tokens/{tokenId}/
payment-credentialsTest in Saudi Arabia:
POST
https://apitest.sa.cybersource.com
/tms/v2/tokens/{tokenId}/
payment-credentialsThe is the identifier of the tokenized card.
{tokenId}
Required Fields for Generating Payment Credentials
- Set to one of these values:
- CRYPTOGRAM
- NETWORK_TOKEN
- SECURITY_CODE
- Set toAFTto generate AFT payment credentials.
Related Information
REST Example: Generating Payment Credentials
Request
{ "paymentCredentialType": "CRYPTOGRAM", "transactionType": "ECOM" }
Request
{ "paymentCredentialType": "CRYPTOGRAM", "transactionType": "AFT" }
Response to a Successful Request
{ "_links": { "self": { "href": "/tms/v2/tokens/7010000000016241111/payment-credentials" } }, "tokenizedCard": { "state": "ACTIVE", "enrollmentId": "c2d1b36fad46aed1ca8318dca5ed1e02", "tokenReferenceId": "168661ada5115ca3589b1ba3dabdb102", "number": "X895370016750801", "expirationMonth": "12", "expirationYear": "2023", "type": "visa", "cryptogram": "AwAAAADggP/Ce5+ZciCXQUUAAAA=", "eci": "05", "requestorId": "40010052236", "card": { "suffix": "0394", "expirationMonth": "12", "expirationYear": "2023" } }, "card": { "number": "411111XXXXXX1111" }, "issuer": { "paymentAccountReference": "V0010013022298169667504231315" }, "processingInformation": { "authorizationOptions": { "initiator": { "merchantInitiatedTransaction": { "previousTransactionId": "123456789619999" } } }, "commerceIndicator": "vbv" } }