- Home
- All APIs
- Access Worldpay
- Older versions
- Tokens API
- Get started with our Tokens API
Get started with our Tokens API
Make yourself familiar with our
Set your headers
Setting your headers is an important part of an API request. The headers represent the meta-data associated with your API request.
Authorization: {your_credentials}
Content-Type: application/vnd.worldpay.tokens-v2.hal+json
Accept: application/vnd.worldpay.tokens-v2.hal+json
Authorization: {your_credentials} Content-Type: application/vnd.worldpay.tokens-v2.hal+json Accept: application/vnd.worldpay.tokens-v2.hal+json
Header | Description |
---|---|
Authorization | We use the Authorization header to identify and authenticate you within Access Worldpay. You must use the Authorization header for any request you send to our Tokens API, unless you are using client certificate authentication over TLS. If you must use this, read our reference guide on |
Content-Type | We require the Content-Type header if the request you're sending includes a request body, and if the HTTP method is a POST or a PUT . |
Accept | We use the Accept header to identify which version of our Tokens API you are using. You must use the Accept header for any request you send to our Tokens API. |
If you're using both the Content-Type
and Accept
headers, they must match.
Note: Replace {your_credentials}
with your base64-encoded Basic Auth username and password. To get your Access Worldpay credentials contact your Implementation Manager.
Query the root resource
Our APIs guide you by providing you with links to the next available actions.
To discover and start using our APIs you must first query the root resource. This returns the available resources within Access Worldpay.
Request
GET https://try.access.worldpay.com/
Note: No request body is needed for this request.
Response
You receive all our available API resources in the response.
{
"_links": {
"payments:authorize": {
"href": "https://try.access.worldpay.com/payments/authorizations"
},
"service:payments": {
"href": "https://try.access.worldpay.com/payments"
},
"service:sessions": {
"href": "https://try.access.worldpay.com/sessions"
},
"service:tokens": {
"href": "https://try.access.worldpay.com/tokens"
},
"service:verifications/accounts": {
"href": "https://try.access.worldpay.com/verifications/accounts"
},
"service:verifications/customers/3ds": {
"href": "https://try.access.worldpay.com/verifications/customers/3ds"
},
"service:verifiedTokens": {
"href": "https://try.access.worldpay.com/verifiedTokens"
},
"service:fraudsight": {
"href": "https://try.access.worldpay.com/fraudsight"
},
"service:exemptions": {
"href": "https://try.access.worldpay.com/exemptions"
},
"service:payouts": {
"href": "https://try.access.worldpay.com/payouts"
},
"service:payment_pages": {
"href": "https://try.access.worldpay.com/payment_pages"
},
"service:payments/alternative/direct": {
"href": "https://try.access.worldpay.com/payments/alternative/direct"
},
"service:payments/alternative/action/paypal": {
"href": "https://try.access.worldpay.com/payments/alternative/action/paypal"
},
"service:payments/alternative/action/ideal": {
"href": "https://try.access.worldpay.com/payments/alternative/action/ideal"
},
"service:moneyTransfers": {
"href": "https://try.access.worldpay.com/moneyTransfers"
},
"curies": [
{
"href": "https://try.access.worldpay.com/rels/payments/{rel}",
"name": "payments",
"templated": true
}
]
}
}
Query the Tokens root resource
Query the service:tokens
resource which gives you links to your next available actions and resources for our Tokens API.
The request
GET https://try.access.worldpay.com/tokens
Note: No request body is needed for this request.
The response
{
"_links": {
"tokens:tokens": {
"href": "https://try.access.worldpay.com/tokens{?tokenId,namespace}",
"templated": true
},
"tokens:networkToken": {
"href": "https://try.access.worldpay.com/tokens/network"
},
"resourceTree": {
"href": "https://try.access.worldpay.com/rels/tokens/resourceTree.json"
},
"curies": [{
"href": "https://try.access.worldpay.com/rels/tokens/{rel}.json",
"name": "tokens",
"templated": true
}]
}
}
Resources
Resources | Description |
---|---|
tokens:tokens | You can use this resource to |
Next steps