Tokens
A collection of tokens representing payment instruments.
GET
Retrieve token(s) based on their tokenId, namespace, or both.
Parameters
Name | Description |
---|---|
tokenId | Worldpay's internal identifier for a token. If supplied, must be between 15 and 21 characters, must consist of digits and upper-case characters excluding 'I' and 'O'. |
namespace | The reference by which a client can identify a shopper. If supplied, must be between 1 and 64 characters, must not start with an underscore, must not contain spaces, '&' or '<'. |
Responses
Response schema
Copied!
{
"type": "object",
"properties": {
"_embedded": {
"type": "object",
"properties": {
"tokens": {
"type": "array",
"items": {
"type": "object",
"properties": {
"tokenPaymentInstrument": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"href": {
"type": "string"
}
}
},
"tokenId": {
"type": "string",
"minLength": 15,
"maxLength": 21,
"pattern": "^[0-9A-HJ-NP-Z]+$"
},
"description": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"pattern": "^[^&<]*$"
},
"tokenExpiryDateTime": {
"type": "string",
"format": "date-time"
},
"namespace": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"schemeTransactionReference": {
"type": "string",
"minLength": 1,
"maxLength": 56,
"pattern": "^[a-zA-Z0-9 ]*$"
},
"paymentInstrument": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"cardNumber": {
"type": "string",
"minLength": 10,
"maxLength": 19,
"pattern": "^[0-9\\*]*$"
},
"cardHolderName": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"cardExpiryDate": {
"type": "object",
"properties": {
"month": {
"type": "integer",
"minimum": 1,
"maximum": 12
},
"year": {
"type": "integer",
"maximum": 9999
}
},
"required": [
"month",
"year"
]
},
"bin": {
"type": "string",
"minLength": 6,
"maxLength": 6,
"pattern": "\\d{6}"
},
"brand": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"fundingType": {
"type": "string",
"minLength": 5,
"maxLength": 7
},
"countryCode": {
"type": "string",
"minLength": 2,
"maxLength": 2
},
"billingAddress": {
"type": "object",
"properties": {
"address1": {
"type": "string"
},
"address2": {
"type": "string"
},
"address3": {
"type": "string"
},
"postalCode": {
"type": "string"
},
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"countryCode": {
"type": "string",
"pattern": "^[A-Z]*$",
"minLength": 2,
"maxLength": 2
}
},
"required": [
"address1",
"postalCode",
"city",
"countryCode"
]
}
},
"required": [
"cardNumber",
"cardHolderName",
"cardExpiryDate",
"bin",
"brand",
"fundingType"
]
},
"_links": {
"type": "object",
"format": "hal+json"
}
},
"required": [
"tokenPaymentInstrument",
"description",
"tokenExpiryDateTime",
"paymentInstrument",
"_links"
]
}
}
}
},
"_links": {
"type": "object",
"format": "hal+json"
}
},
"required": [
"_links"
]
}
{ "type": "object", "properties": { "_embedded": { "type": "object", "properties": { "tokens": { "type": "array", "items": { "type": "object", "properties": { "tokenPaymentInstrument": { "type": "object", "properties": { "type": { "type": "string" }, "href": { "type": "string" } } }, "tokenId": { "type": "string", "minLength": 15, "maxLength": 21, "pattern": "^[0-9A-HJ-NP-Z]+$" }, "description": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[^&<]*$" }, "tokenExpiryDateTime": { "type": "string", "format": "date-time" }, "namespace": { "type": "string", "minLength": 1, "maxLength": 64 }, "schemeTransactionReference": { "type": "string", "minLength": 1, "maxLength": 56, "pattern": "^[a-zA-Z0-9 ]*$" }, "paymentInstrument": { "type": "object", "properties": { "type": { "type": "string" }, "cardNumber": { "type": "string", "minLength": 10, "maxLength": 19, "pattern": "^[0-9\\*]*$" }, "cardHolderName": { "type": "string", "minLength": 1, "maxLength": 255 }, "cardExpiryDate": { "type": "object", "properties": { "month": { "type": "integer", "minimum": 1, "maximum": 12 }, "year": { "type": "integer", "maximum": 9999 } }, "required": [ "month", "year" ] }, "bin": { "type": "string", "minLength": 6, "maxLength": 6, "pattern": "\\d{6}" }, "brand": { "type": "string", "minLength": 1, "maxLength": 255 }, "fundingType": { "type": "string", "minLength": 5, "maxLength": 7 }, "countryCode": { "type": "string", "minLength": 2, "maxLength": 2 }, "billingAddress": { "type": "object", "properties": { "address1": { "type": "string" }, "address2": { "type": "string" }, "address3": { "type": "string" }, "postalCode": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "countryCode": { "type": "string", "pattern": "^[A-Z]*$", "minLength": 2, "maxLength": 2 } }, "required": [ "address1", "postalCode", "city", "countryCode" ] } }, "required": [ "cardNumber", "cardHolderName", "cardExpiryDate", "bin", "brand", "fundingType" ] }, "_links": { "type": "object", "format": "hal+json" } }, "required": [ "tokenPaymentInstrument", "description", "tokenExpiryDateTime", "paymentInstrument", "_links" ] } } } }, "_links": { "type": "object", "format": "hal+json" } }, "required": [ "_links" ] }
POST
Create a new Token.
Request
Copied!
{
"type": "object",
"properties": {
"description": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"pattern": "^[^&<]*$"
},
"tokenExpiryDateTime": {
"type": "string",
"format": "date-time"
},
"namespace": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"originalToken": {
"type": "string"
},
"schemeTransactionReference": {
"type": "string",
"minLength": 1,
"maxLength": 56,
"pattern": "^[a-zA-Z0-9 ]*$"
},
"paymentInstrument": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"cardNumber": {
"type": "string",
"minLength": 10,
"maxLength": 19,
"pattern": "^[0-9]*$"
},
"cardHolderName": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"cardExpiryDate": {
"type": "object",
"properties": {
"month": {
"type": "integer",
"minimum": 1,
"maximum": 12
},
"year": {
"type": "integer",
"maximum": 9999
}
},
"required": [
"month",
"year"
]
},
"billingAddress": {
"type": "object",
"properties": {
"address1": {
"type": "string"
},
"address2": {
"type": "string"
},
"address3": {
"type": "string"
},
"postalCode": {
"type": "string"
},
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"countryCode": {
"type": "string",
"pattern": "^[A-Z]*$",
"minLength": 2,
"maxLength": 2
}
},
"required": [
"address1",
"postalCode",
"city",
"countryCode"
]
}
},
"required": [
"cardNumber",
"cardHolderName",
"cardExpiryDate"
]
},
"merchant": {
"type": "object",
"properties": {
"entity": {
"type": "string"
}
},
"required": [
"entity"
]
}
},
"required": [
"merchant",
"paymentInstrument"
]
}
{ "type": "object", "properties": { "description": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[^&<]*$" }, "tokenExpiryDateTime": { "type": "string", "format": "date-time" }, "namespace": { "type": "string", "minLength": 1, "maxLength": 64 }, "originalToken": { "type": "string" }, "schemeTransactionReference": { "type": "string", "minLength": 1, "maxLength": 56, "pattern": "^[a-zA-Z0-9 ]*$" }, "paymentInstrument": { "type": "object", "properties": { "type": { "type": "string" }, "cardNumber": { "type": "string", "minLength": 10, "maxLength": 19, "pattern": "^[0-9]*$" }, "cardHolderName": { "type": "string", "minLength": 1, "maxLength": 255 }, "cardExpiryDate": { "type": "object", "properties": { "month": { "type": "integer", "minimum": 1, "maximum": 12 }, "year": { "type": "integer", "maximum": 9999 } }, "required": [ "month", "year" ] }, "billingAddress": { "type": "object", "properties": { "address1": { "type": "string" }, "address2": { "type": "string" }, "address3": { "type": "string" }, "postalCode": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "countryCode": { "type": "string", "pattern": "^[A-Z]*$", "minLength": 2, "maxLength": 2 } }, "required": [ "address1", "postalCode", "city", "countryCode" ] } }, "required": [ "cardNumber", "cardHolderName", "cardExpiryDate" ] }, "merchant": { "type": "object", "properties": { "entity": { "type": "string" } }, "required": [ "entity" ] } }, "required": [ "merchant", "paymentInstrument" ] }
Responses
Headers
Name | Description |
---|---|
Location | A URI identifying the matched token resource. |
Response schema
Copied!
{
"type": "object",
"properties": {
"tokenPaymentInstrument": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"href": {
"type": "string"
}
}
},
"tokenId": {
"type": "string",
"minLength": 15,
"maxLength": 21,
"pattern": "^[0-9A-HJ-NP-Z]+$"
},
"description": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"pattern": "^[^&<]*$"
},
"tokenExpiryDateTime": {
"type": "string",
"format": "date-time"
},
"namespace": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"schemeTransactionReference": {
"type": "string",
"minLength": 1,
"maxLength": 56,
"pattern": "^[a-zA-Z0-9 ]*$"
},
"paymentInstrument": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"cardNumber": {
"type": "string",
"minLength": 10,
"maxLength": 19,
"pattern": "^[0-9\\*]*$"
},
"cardHolderName": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"cardExpiryDate": {
"type": "object",
"properties": {
"month": {
"type": "integer",
"minimum": 1,
"maximum": 12
},
"year": {
"type": "integer",
"maximum": 9999
}
},
"required": [
"month",
"year"
]
},
"bin": {
"type": "string",
"minLength": 6,
"maxLength": 6,
"pattern": "\\d{6}"
},
"brand": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"fundingType": {
"type": "string",
"minLength": 5,
"maxLength": 7
},
"countryCode": {
"type": "string",
"minLength": 2,
"maxLength": 2
},
"billingAddress": {
"type": "object",
"properties": {
"address1": {
"type": "string"
},
"address2": {
"type": "string"
},
"address3": {
"type": "string"
},
"postalCode": {
"type": "string"
},
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"countryCode": {
"type": "string",
"pattern": "^[A-Z]*$",
"minLength": 2,
"maxLength": 2
}
},
"required": [
"address1",
"postalCode",
"city",
"countryCode"
]
}
},
"required": [
"cardNumber",
"cardHolderName",
"cardExpiryDate",
"bin",
"brand",
"fundingType"
]
},
"_links": {
"type": "object",
"format": "hal+json"
}
},
"required": [
"tokenPaymentInstrument",
"description",
"tokenExpiryDateTime",
"paymentInstrument",
"_links"
]
}
{ "type": "object", "properties": { "tokenPaymentInstrument": { "type": "object", "properties": { "type": { "type": "string" }, "href": { "type": "string" } } }, "tokenId": { "type": "string", "minLength": 15, "maxLength": 21, "pattern": "^[0-9A-HJ-NP-Z]+$" }, "description": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[^&<]*$" }, "tokenExpiryDateTime": { "type": "string", "format": "date-time" }, "namespace": { "type": "string", "minLength": 1, "maxLength": 64 }, "schemeTransactionReference": { "type": "string", "minLength": 1, "maxLength": 56, "pattern": "^[a-zA-Z0-9 ]*$" }, "paymentInstrument": { "type": "object", "properties": { "type": { "type": "string" }, "cardNumber": { "type": "string", "minLength": 10, "maxLength": 19, "pattern": "^[0-9\\*]*$" }, "cardHolderName": { "type": "string", "minLength": 1, "maxLength": 255 }, "cardExpiryDate": { "type": "object", "properties": { "month": { "type": "integer", "minimum": 1, "maximum": 12 }, "year": { "type": "integer", "maximum": 9999 } }, "required": [ "month", "year" ] }, "bin": { "type": "string", "minLength": 6, "maxLength": 6, "pattern": "\\d{6}" }, "brand": { "type": "string", "minLength": 1, "maxLength": 255 }, "fundingType": { "type": "string", "minLength": 5, "maxLength": 7 }, "countryCode": { "type": "string", "minLength": 2, "maxLength": 2 }, "billingAddress": { "type": "object", "properties": { "address1": { "type": "string" }, "address2": { "type": "string" }, "address3": { "type": "string" }, "postalCode": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "countryCode": { "type": "string", "pattern": "^[A-Z]*$", "minLength": 2, "maxLength": 2 } }, "required": [ "address1", "postalCode", "city", "countryCode" ] } }, "required": [ "cardNumber", "cardHolderName", "cardExpiryDate", "bin", "brand", "fundingType" ] }, "_links": { "type": "object", "format": "hal+json" } }, "required": [ "tokenPaymentInstrument", "description", "tokenExpiryDateTime", "paymentInstrument", "_links" ] }
Headers
Name | Description |
---|---|
Location | A URI identifying the created token resource. |
Response schema
Copied!
{
"type": "object",
"properties": {
"tokenPaymentInstrument": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"href": {
"type": "string"
}
}
},
"tokenId": {
"type": "string",
"minLength": 15,
"maxLength": 21,
"pattern": "^[0-9A-HJ-NP-Z]+$"
},
"description": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"pattern": "^[^&<]*$"
},
"tokenExpiryDateTime": {
"type": "string",
"format": "date-time"
},
"namespace": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"schemeTransactionReference": {
"type": "string",
"minLength": 1,
"maxLength": 56,
"pattern": "^[a-zA-Z0-9 ]*$"
},
"paymentInstrument": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"cardNumber": {
"type": "string",
"minLength": 10,
"maxLength": 19,
"pattern": "^[0-9\\*]*$"
},
"cardHolderName": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"cardExpiryDate": {
"type": "object",
"properties": {
"month": {
"type": "integer",
"minimum": 1,
"maximum": 12
},
"year": {
"type": "integer",
"maximum": 9999
}
},
"required": [
"month",
"year"
]
},
"bin": {
"type": "string",
"minLength": 6,
"maxLength": 6,
"pattern": "\\d{6}"
},
"brand": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"fundingType": {
"type": "string",
"minLength": 5,
"maxLength": 7
},
"countryCode": {
"type": "string",
"minLength": 2,
"maxLength": 2
},
"billingAddress": {
"type": "object",
"properties": {
"address1": {
"type": "string"
},
"address2": {
"type": "string"
},
"address3": {
"type": "string"
},
"postalCode": {
"type": "string"
},
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"countryCode": {
"type": "string",
"pattern": "^[A-Z]*$",
"minLength": 2,
"maxLength": 2
}
},
"required": [
"address1",
"postalCode",
"city",
"countryCode"
]
}
},
"required": [
"cardNumber",
"cardHolderName",
"cardExpiryDate",
"bin",
"brand",
"fundingType"
]
},
"_links": {
"type": "object",
"format": "hal+json"
}
},
"required": [
"tokenPaymentInstrument",
"description",
"tokenExpiryDateTime",
"paymentInstrument",
"_links"
]
}
{ "type": "object", "properties": { "tokenPaymentInstrument": { "type": "object", "properties": { "type": { "type": "string" }, "href": { "type": "string" } } }, "tokenId": { "type": "string", "minLength": 15, "maxLength": 21, "pattern": "^[0-9A-HJ-NP-Z]+$" }, "description": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[^&<]*$" }, "tokenExpiryDateTime": { "type": "string", "format": "date-time" }, "namespace": { "type": "string", "minLength": 1, "maxLength": 64 }, "schemeTransactionReference": { "type": "string", "minLength": 1, "maxLength": 56, "pattern": "^[a-zA-Z0-9 ]*$" }, "paymentInstrument": { "type": "object", "properties": { "type": { "type": "string" }, "cardNumber": { "type": "string", "minLength": 10, "maxLength": 19, "pattern": "^[0-9\\*]*$" }, "cardHolderName": { "type": "string", "minLength": 1, "maxLength": 255 }, "cardExpiryDate": { "type": "object", "properties": { "month": { "type": "integer", "minimum": 1, "maximum": 12 }, "year": { "type": "integer", "maximum": 9999 } }, "required": [ "month", "year" ] }, "bin": { "type": "string", "minLength": 6, "maxLength": 6, "pattern": "\\d{6}" }, "brand": { "type": "string", "minLength": 1, "maxLength": 255 }, "fundingType": { "type": "string", "minLength": 5, "maxLength": 7 }, "countryCode": { "type": "string", "minLength": 2, "maxLength": 2 }, "billingAddress": { "type": "object", "properties": { "address1": { "type": "string" }, "address2": { "type": "string" }, "address3": { "type": "string" }, "postalCode": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "countryCode": { "type": "string", "pattern": "^[A-Z]*$", "minLength": 2, "maxLength": 2 } }, "required": [ "address1", "postalCode", "city", "countryCode" ] } }, "required": [ "cardNumber", "cardHolderName", "cardExpiryDate", "bin", "brand", "fundingType" ] }, "_links": { "type": "object", "format": "hal+json" } }, "required": [ "tokenPaymentInstrument", "description", "tokenExpiryDateTime", "paymentInstrument", "_links" ] }
Headers
Name | Description |
---|---|
Location | A URI identifying the conflicting token resource. |
Response schema
Copied!
{
"type": "object",
"properties": {
"tokenPaymentInstrument": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"href": {
"type": "string"
}
}
},
"tokenId": {
"type": "string",
"minLength": 15,
"maxLength": 21,
"pattern": "^[0-9A-HJ-NP-Z]+$"
},
"description": {
"type": "string",
"minLength": 1,
"maxLength": 255,
"pattern": "^[^&<]*$"
},
"tokenExpiryDateTime": {
"type": "string",
"format": "date-time"
},
"namespace": {
"type": "string",
"minLength": 1,
"maxLength": 64
},
"schemeTransactionReference": {
"type": "string",
"minLength": 1,
"maxLength": 56,
"pattern": "^[a-zA-Z0-9 ]*$"
},
"paymentInstrument": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"cardNumber": {
"type": "string",
"minLength": 10,
"maxLength": 19,
"pattern": "^[0-9\\*]*$"
},
"cardHolderName": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"cardExpiryDate": {
"type": "object",
"properties": {
"month": {
"type": "integer",
"minimum": 1,
"maximum": 12
},
"year": {
"type": "integer",
"maximum": 9999
}
},
"required": [
"month",
"year"
]
},
"bin": {
"type": "string",
"minLength": 6,
"maxLength": 6,
"pattern": "\\d{6}"
},
"brand": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"fundingType": {
"type": "string",
"minLength": 5,
"maxLength": 7
},
"countryCode": {
"type": "string",
"minLength": 2,
"maxLength": 2
},
"billingAddress": {
"type": "object",
"properties": {
"address1": {
"type": "string"
},
"address2": {
"type": "string"
},
"address3": {
"type": "string"
},
"postalCode": {
"type": "string"
},
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"countryCode": {
"type": "string",
"pattern": "^[A-Z]*$",
"minLength": 2,
"maxLength": 2
}
},
"required": [
"address1",
"postalCode",
"city",
"countryCode"
]
}
},
"required": [
"cardNumber",
"cardHolderName",
"cardExpiryDate",
"bin",
"brand",
"fundingType"
]
},
"conflicts": {
"type": "object",
"properties": {
"paymentInstrument": {
"type": "object",
"properties": {
"cardHolderName": {
"type": "string",
"minLength": 1,
"maxLength": 255
},
"cardExpiryDate": {
"type": "object",
"properties": {
"month": {
"type": "integer",
"minimum": 1,
"maximum": 12
},
"year": {
"type": "integer",
"maximum": 9999
}
},
"required": [
"month",
"year"
]
},
"billingAddress": {
"type": "object",
"properties": {
"address1": {
"type": "string"
},
"address2": {
"type": "string"
},
"address3": {
"type": "string"
},
"postalCode": {
"type": "string"
},
"city": {
"type": "string"
},
"state": {
"type": "string"
},
"countryCode": {
"type": "string",
"pattern": "^[A-Z]*$",
"minLength": 2,
"maxLength": 2
}
},
"required": [
"address1",
"postalCode",
"city",
"countryCode"
]
}
}
},
"schemeTransactionReference": {
"type": "string"
}
}
},
"_links": {
"type": "object",
"format": "hal+json"
}
},
"required": [
"tokenPaymentInstrument",
"tokenId",
"description",
"tokenExpiryDateTime",
"paymentInstrument",
"conflicts",
"_links"
]
}
{ "type": "object", "properties": { "tokenPaymentInstrument": { "type": "object", "properties": { "type": { "type": "string" }, "href": { "type": "string" } } }, "tokenId": { "type": "string", "minLength": 15, "maxLength": 21, "pattern": "^[0-9A-HJ-NP-Z]+$" }, "description": { "type": "string", "minLength": 1, "maxLength": 255, "pattern": "^[^&<]*$" }, "tokenExpiryDateTime": { "type": "string", "format": "date-time" }, "namespace": { "type": "string", "minLength": 1, "maxLength": 64 }, "schemeTransactionReference": { "type": "string", "minLength": 1, "maxLength": 56, "pattern": "^[a-zA-Z0-9 ]*$" }, "paymentInstrument": { "type": "object", "properties": { "type": { "type": "string" }, "cardNumber": { "type": "string", "minLength": 10, "maxLength": 19, "pattern": "^[0-9\\*]*$" }, "cardHolderName": { "type": "string", "minLength": 1, "maxLength": 255 }, "cardExpiryDate": { "type": "object", "properties": { "month": { "type": "integer", "minimum": 1, "maximum": 12 }, "year": { "type": "integer", "maximum": 9999 } }, "required": [ "month", "year" ] }, "bin": { "type": "string", "minLength": 6, "maxLength": 6, "pattern": "\\d{6}" }, "brand": { "type": "string", "minLength": 1, "maxLength": 255 }, "fundingType": { "type": "string", "minLength": 5, "maxLength": 7 }, "countryCode": { "type": "string", "minLength": 2, "maxLength": 2 }, "billingAddress": { "type": "object", "properties": { "address1": { "type": "string" }, "address2": { "type": "string" }, "address3": { "type": "string" }, "postalCode": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "countryCode": { "type": "string", "pattern": "^[A-Z]*$", "minLength": 2, "maxLength": 2 } }, "required": [ "address1", "postalCode", "city", "countryCode" ] } }, "required": [ "cardNumber", "cardHolderName", "cardExpiryDate", "bin", "brand", "fundingType" ] }, "conflicts": { "type": "object", "properties": { "paymentInstrument": { "type": "object", "properties": { "cardHolderName": { "type": "string", "minLength": 1, "maxLength": 255 }, "cardExpiryDate": { "type": "object", "properties": { "month": { "type": "integer", "minimum": 1, "maximum": 12 }, "year": { "type": "integer", "maximum": 9999 } }, "required": [ "month", "year" ] }, "billingAddress": { "type": "object", "properties": { "address1": { "type": "string" }, "address2": { "type": "string" }, "address3": { "type": "string" }, "postalCode": { "type": "string" }, "city": { "type": "string" }, "state": { "type": "string" }, "countryCode": { "type": "string", "pattern": "^[A-Z]*$", "minLength": 2, "maxLength": 2 } }, "required": [ "address1", "postalCode", "city", "countryCode" ] } } }, "schemeTransactionReference": { "type": "string" } } }, "_links": { "type": "object", "format": "hal+json" } }, "required": [ "tokenPaymentInstrument", "tokenId", "description", "tokenExpiryDateTime", "paymentInstrument", "conflicts", "_links" ] }
Link relationship
tokens:tokens
The top-level collection resource of the Token Service.
resourceTree
A document showing possible interactions with the Token Service.
tokens:networkToken
Provision a network payment token
Retrieve the Tokens top-level collection resource.
GEThttps://try.access.worldpay.com/tokens
Copied!
{
"Accept": "application/vnd.worldpay.tokens-v3.hal+json"
}
{ "Accept": "application/vnd.worldpay.tokens-v3.hal+json" }
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!
{
"_links": {
"tokens:tokens": {
"href": "https://try.access.worldpay.com/tokens{?tokenId,namespace}",
"templated": true
},
"resourceTree": {
"href": "https://try.access.worldpay.com/rels/tokens/resourceTree.json"
},
"tokens:networkToken": {
"href": "https://try.access.worldpay.com/tokens/network"
},
"curies": [
{
"href": "https://try.access.worldpay.com/rels/tokens/{rel}.json",
"name": "tokens",
"templated": true
}
]
}
}
{ "_links": { "tokens:tokens": { "href": "https://try.access.worldpay.com/tokens{?tokenId,namespace}", "templated": true }, "resourceTree": { "href": "https://try.access.worldpay.com/rels/tokens/resourceTree.json" }, "tokens:networkToken": { "href": "https://try.access.worldpay.com/tokens/network" }, "curies": [ { "href": "https://try.access.worldpay.com/rels/tokens/{rel}.json", "name": "tokens", "templated": true } ] } }