Last Updated: 18 May 2023 | Change Log
Querying Network Tokens and Provisioning Cryptograms
Proceed to network token inquiry if you do not receive a network token, else proceed to provisioning a cryptogram.
Network token inquiry
If you do not receive a tokenNumber
, send a GET
request to the tokens:networkTokenLookup
action link returned in the response of your create a network token request
While creating a network token via Mastercard, you may not receive the tokenNumber
immediately. In that case, you must send requests to the tokens:networkTokenLookup
action link for up to 5 minutes while the network token is being created.
Network token inquiry request
GET
https://try.access.worldpay.com/tokens/network/E9026BB9-0FD3-47C9-A088-17A68BF07659
No request body is needed for this request.
Response
The response status is 200 OK
. You receive links to your next available actions in your response.
{
"tokenPaymentInstrument": {
"status": "Active",
"type": "card/networkToken",
"tokenNumber": "4111111111111111",
"expiryDate": {
"month": 12,
"year": 2025
}
},
"paymentInstrument": {
"type": "card/masked",
"firstSix": "411111",
"lastFour": "1111",
"cardExpiryDate": {
"month": 12,
"year": 2025
},
"paymentAccountReference": "41111111111111111111111111111"
},
"_links": {
"self": {
"href": "https://try.access.worldpay.com/tokens/network/0b56de37-22b3-4422-a791-ae9550df1db0"
},
"tokens:networkTokenCryptogram": {
"href": "https://try.access.worldpay.com/tokens/network/cryptograms"
},
"curies": [
{
"href": "https://try.access.worldpay.com/rels/tokens/{rel}.json",
"name": "tokens",
"templated": true
}
]
}
}
Parameter | Description |
---|---|
tokenPaymentInstrument | An object that contains the network token details. |
tokenPaymentInstrument.status | Status of the network token. Possible values: Active, Inactive and Suspended. |
tokenPaymentInstrument.type | Should always be card/networkToken to indicate that this is a network token. |
tokenPaymentInstrument.tokenNumber | A 16 digit network token number. |
tokenPaymentInstrument.expiryDate | Expiry date of the network token. |
tokenPaymentInstrument.expiryDate.month | Expiry month of the network token. |
tokenPaymentInstrument.expiryDate.year | Expiry year of the network token. |
paymentInstrument | An object that contains the payment card details. |
paymentInstrument.firstSix | First six digits of your customer's card number. |
paymentInstrument.lastFour | Last four digits of your customer's card number. |
paymentInstrument.cardExpiryDate | An object that contains your customer's card expiry date. |
paymentInstrument.cardExpiryDate.month | Card expiry month. |
paymentInstrument.cardExpiryDate.year | Card expiry year. |
tokenPaymentInstrument.paymentAccountReference | Also known as PAR, an alphanumeric value up to 29 characters used to link a Payment Account (PAN) to a token associated with it. |
Provisioning network token cryptograms
Once you receive the tokenNumber
, provision a cryptogram to take a card on file payment. A cryptogram contains transaction specific information.
Cryptograms provisioned through Visa are valid for 24 hours and those provisioned through Mastercard are valid for 72 hours.
To provision a network token cryptogram , POST
your request to the tokens:networkTokenCryptogram
action link. POST
https://try.access.worldpay.com/tokens/network/cryptograms
Request
{
"tokenNumber": "4111111111111111"
}
Parameter | Required | Description |
---|---|---|
tokenNumber | ✅ | 16 digits network token number provisioned via card schemes. |
Response
{
"cryptogramDetails": {
"cryptogram": "AgAAAAAASFh+gDRt/rq8QOkAAAA=",
"eci": "07"
},
"_links": {
"self": {
"href": "https://try.access.worldpay.com/tokens/network/cryptograms"
},
"tokens:networkTokenLookup": {
"href": "https://try.access.worldpay.com/tokens/network/{tokenReference}",
"templated": true
},
"curies": [
{
"href": "https://try.access.worldpay.com/rels/tokens/{rel}.json",
"name": "tokens",
"templated": true
}
]
}
}
Parameter | Description |
---|---|
cryptogramDetails | Contains the details of the new cryptogram. |
cryptogramDetails.cryptogram | The value for the cryptogram. Depending on the type of network token used, you can expect to receive a cryptogram in one of the following formats:
|
cryptogramDetails.eci | Electronic Commerce Indicator (ECI). Indicates the outcome of the cryptogram provisioning. Possible values:
|
You can use the network tokens created with Access Worldpay across other providers or gateways such as Worldwide payment gateway(WPG).
Next steps