- Home
- All APIs
- Access Worldpay
- API reference
- Tokens
- Network Token
Network Token
A Network Token representing a payment instrument.
POST
Request provisioning for a network token and returns a reference for use later
Responses
Response schema
Copied!
{
"type": "object",
"properties": {
"tokenReference": {
"type": "string"
},
"tokenPaymentInstrument": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"type": {
"type": "string"
},
"tokenNumber": {
"type": "string"
},
"expiryDate": {
"type": "object",
"properties": {
"month": {
"type": "integer"
},
"year": {
"type": "integer"
}
},
"required": [
"month",
"year"
]
}
},
"required": [
"status",
"type",
"tokenNumber",
"expiryDate"
]
},
"paymentInstrument": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"firstSix": {
"type": "string"
},
"lastFour": {
"type": "string"
},
"cardExpiryDate": {
"type": "object",
"properties": {
"month": {
"type": "integer"
},
"year": {
"type": "integer"
}
},
"required": [
"month",
"year"
]
}
},
"required": [
"type",
"firstSix",
"lastFour",
"cardExpiryDate"
]
},
"_links": {
"type": "object",
"format": "hal+json"
}
},
"required": [
"tokenReference",
"paymentInstrument",
"_links"
]
}
{ "type": "object", "properties": { "tokenReference": { "type": "string" }, "tokenPaymentInstrument": { "type": "object", "properties": { "status": { "type": "string" }, "type": { "type": "string" }, "tokenNumber": { "type": "string" }, "expiryDate": { "type": "object", "properties": { "month": { "type": "integer" }, "year": { "type": "integer" } }, "required": [ "month", "year" ] } }, "required": [ "status", "type", "tokenNumber", "expiryDate" ] }, "paymentInstrument": { "type": "object", "properties": { "type": { "type": "string" }, "firstSix": { "type": "string" }, "lastFour": { "type": "string" }, "cardExpiryDate": { "type": "object", "properties": { "month": { "type": "integer" }, "year": { "type": "integer" } }, "required": [ "month", "year" ] } }, "required": [ "type", "firstSix", "lastFour", "cardExpiryDate" ] }, "_links": { "type": "object", "format": "hal+json" } }, "required": [ "tokenReference", "paymentInstrument", "_links" ] }
GET
Get the actual network token using the network token reference
Responses
Response schema
Copied!
{
"type": "object",
"properties": {
"tokenPaymentInstrument": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"type": {
"type": "string"
},
"tokenNumber": {
"type": "string"
},
"expiryDate": {
"type": "object",
"properties": {
"month": {
"type": "integer"
},
"year": {
"type": "integer"
}
},
"required": [
"month",
"year"
]
}
},
"required": [
"status",
"type"
]
},
"paymentInstrument": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"firstSix": {
"type": "string"
},
"lastFour": {
"type": "string"
},
"cardExpiryDate": {
"type": "object",
"properties": {
"month": {
"type": "integer"
},
"year": {
"type": "integer"
}
},
"required": [
"month",
"year"
]
}
},
"required": [
"type",
"firstSix",
"lastFour",
"cardExpiryDate"
]
},
"provisioningErrors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"errorCode": {
"type": "string"
},
"providerErrorCode": {
"type": "string"
},
"source": {
"type": "string"
},
"context": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"errorCode",
"providerErrorCode",
"source",
"context",
"message"
]
}
},
"_links": {
"type": "object",
"format": "hal+json"
}
},
"required": [
"tokenPaymentInstrument",
"paymentInstrument",
"_links"
]
}
{ "type": "object", "properties": { "tokenPaymentInstrument": { "type": "object", "properties": { "status": { "type": "string" }, "type": { "type": "string" }, "tokenNumber": { "type": "string" }, "expiryDate": { "type": "object", "properties": { "month": { "type": "integer" }, "year": { "type": "integer" } }, "required": [ "month", "year" ] } }, "required": [ "status", "type" ] }, "paymentInstrument": { "type": "object", "properties": { "type": { "type": "string" }, "firstSix": { "type": "string" }, "lastFour": { "type": "string" }, "cardExpiryDate": { "type": "object", "properties": { "month": { "type": "integer" }, "year": { "type": "integer" } }, "required": [ "month", "year" ] } }, "required": [ "type", "firstSix", "lastFour", "cardExpiryDate" ] }, "provisioningErrors": { "type": "array", "items": { "type": "object", "properties": { "errorCode": { "type": "string" }, "providerErrorCode": { "type": "string" }, "source": { "type": "string" }, "context": { "type": "string" }, "message": { "type": "string" } }, "required": [ "errorCode", "providerErrorCode", "source", "context", "message" ] } }, "_links": { "type": "object", "format": "hal+json" } }, "required": [ "tokenPaymentInstrument", "paymentInstrument", "_links" ] }
Link relationship
tokens:networkToken
Requests a provisioning of a network token
tokens:cryptograms
If the token is ready this will return a cryptogram based on the token
Request to provision a network token.
POSThttps://try.access.worldpay.com/tokens/network
Copied!
{
"Accept": "application/vnd.worldpay.tokens-v3.hal+json",
"Content-Type": "application/vnd.worldpay.tokens-v3.hal+json"
}
{ "Accept": "application/vnd.worldpay.tokens-v3.hal+json", "Content-Type": "application/vnd.worldpay.tokens-v3.hal+json" }
Copied!
{
"paymentInstrument": {
"cardHolderName": "name",
"type": "card/front",
"cardExpiryDate": {
"month": 1,
"year": 2050
},
"cardNumber": "4444333322221111"
},
"merchant": {
"entity": "default"
}
}
{ "paymentInstrument": { "cardHolderName": "name", "type": "card/front", "cardExpiryDate": { "month": 1, "year": 2050 }, "cardNumber": "4444333322221111" }, "merchant": { "entity": "default" } }
200
Copied!
{
"Content-Type": "application/vnd.worldpay.tokens-v3.hal+json;charset=UTF-8"
}
{ "Content-Type": "application/vnd.worldpay.tokens-v3.hal+json;charset=UTF-8" }
Copied!
{
"tokenReference": "aa224320-425c-40b6-9781-2cb7df76b0c8",
"paymentInstrument": {
"type": "card/masked",
"firstSix": "444433",
"lastFour": "1111",
"cardExpiryDate": {
"month": 1,
"year": 2050
}
},
"_links": {
"self": {
"href": "https://try.access.worldpay.com/tokens/network"
},
"tokens:networkTokenLookup": {
"href": "https://try.access.worldpay.com/tokens/network/aa224320-425c-40b6-9781-2cb7df76b0c8"
},
"curies": [
{
"href": "https://try.access.worldpay.com/rels/tokens/{rel}.json",
"name": "tokens",
"templated": true
}
]
}
}
{ "tokenReference": "aa224320-425c-40b6-9781-2cb7df76b0c8", "paymentInstrument": { "type": "card/masked", "firstSix": "444433", "lastFour": "1111", "cardExpiryDate": { "month": 1, "year": 2050 } }, "_links": { "self": { "href": "https://try.access.worldpay.com/tokens/network" }, "tokens:networkTokenLookup": { "href": "https://try.access.worldpay.com/tokens/network/aa224320-425c-40b6-9781-2cb7df76b0c8" }, "curies": [ { "href": "https://try.access.worldpay.com/rels/tokens/{rel}.json", "name": "tokens", "templated": true } ] } }