Retrieve a Customer Payment Instrument with an Unmasked
Card Number
This section shows you how to retrieve a payment instrument with an unmasked card number.
IMPORTANT
To retrieve unmasked payment
details, you must ensure that your MLE key pair and your token vault are configured
correctly. For more information on MLE keys, see Message-Level Encryption Keys. For
more information on token vaults, see Token Vault Management. If
necessary, contact your
Cybersource
account manager or customer
support. The response is BASE 64-encoded JSON web
encryption (JWE) token. The decoded JWE has these elements:
{ "alg": "RSA-OAEP-256", //The algorithm used to encrypt the CEK "cty": "json", //The content type "typ": "JWT", //The token type "enc": "A256GCM", //The algorithm that is used to encrypt the message "kid": "keyId" //The serial number of shared public cert for encryption of CEK } <Encrypted Data> //The encrypted payload that matches the JSON response normally returned by theTMSAPI, except with an unmasked payment details
Header Configuration
You must pass this request header to retrieve unmasked payment details:
Accept: application/jose
. The term
application/jose
refers to Javascript Object Signing and
Encryption (JOSE). JOSE is a framework that provides end-to-end security to
JavaScript Object Notation (JSON)-based data structures. JOSE achieves this by
offering a collection of specifications to encrypt and digitally sign JSON payloads.
In this case, the response is message-level encrypted using a JSON Web Token
(JWT).Endpoint
Test:
GET
https://apitest.cybersource.com
/tms/v2/customers/{customerTokenId}
/payment-instruments/{paymentInstrumentTokenId}
Production:
GET
https://api.cybersource.com
/tms/v2/customers/{customerTokenId}
/payment-instruments/{paymentInstrumentTokenId}
Production in India:
GET
https://api.in.cybersource.com
/tms/v2/customers/{customerTokenId}
/payment-instruments/{paymentInstrumentTokenId}
The is the customer token ID returned in the
is the payment instrument token ID you
want to retrieve. For more information, see Create a Customer
and Create a Customer Payment Instrument.
{customerTokenId}
id
field when you created the customer token.
The {paymentInstrumentTokenId}
REST Example: Retrieving a Customer Payment Instrument with
an Unmasked Card Number
Request
GEThttps://apitest.cybersource.com/tms/v2/customers/F2F3ADA770102B51E053A2598D0A9078/payment-instruments/F39732BE4BDA9A1EE053AF598E0A4081
Response to a Successful Request
eyJraWQiOiJiYTE1ZDRmMTIzMTM0NjlkZjg5MDM1Nzk2YWE4Nzc4ZG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