# Tokens

Minimize the exposure of sensitive card details and increase the security of your customer's card details.
**Authentication header**

```
  Authorization: {your_credentials}
```
Replace `{your_credentials}` with your base64-encoded Basic Auth username and password given to you by your Worldpay Implementation Manager.
 
You **must** use the `Authorization` header for any request you send to our Tokens API.

**Accept & Content-Type headers**

```
  Accept: application/vnd.worldpay.tokens-v3.hal+json
  Content-Type: application/vnd.worldpay.tokens-v3.hal+json
```
We use the Accept header to identify which version of our API you are using. You must use the Accept header for any request you send to our Tokens API.

For detokenization requests, adapt the Accept header to also pass masked = false, as follows: `Accept:` `'application/vnd.worldpay.tokens-v3.hal+json; masked=false'`
Detokenizing exposes your business to high levels of PCI auditing, required to remain PCI compliant.
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.

**DNS whitelisting**
Whitelist the following URLs:
* `https://try.access.worldpay.com/`
* `https://access.worldpay.com/`

Please ensure you use DNS whitelisting, not explicit IP whitelisting. When you make a request within Access Worldpay, you should always cache the response returned.

Version: 3

Metadata:
  - category: ["Tokens"]
  - business: ["Enterprise"]
  - catalog-list: true
  - generated: false

## Servers

Test (Try)
```
https://try.access.worldpay.com
```

Live
```
https://access.worldpay.com
```

## Security

### BasicAuth

Type: http
Scheme: basic

## Download OpenAPI description

 - [Tokens](https://docs.worldpay.com/access/_bundle/products/tokens/@v3/openapi.yaml)

## Token

 - [POST /tokens](https://docs.worldpay.com/access/products/tokens/openapi/token/createsecuritytoken.md): Create a new token for the payment instrument.
 - [GET /tokens](https://docs.worldpay.com/access/products/tokens/openapi/token/querysecuritytoken.md): At least one of `tokenId` or `namespace` must be provided. If the token was created with a namespace, both `tokenId` and `namespace` must be supplied. To look up all tokens created under a namespace,
 - [GET /tokens/{linkData}](https://docs.worldpay.com/access/products/tokens/openapi/token/getsecuritytokenbyhref.md): Retrieve token details using the token href representing the token.
 - [PUT /tokens/{linkData}](https://docs.worldpay.com/access/products/tokens/openapi/token/updatesecuritytoken.md): Updating different fields represented by the token.
 - [DELETE /tokens/{linkData}](https://docs.worldpay.com/access/products/tokens/openapi/token/deletesecuritytoken.md): Deleting a token based on an encrypted token href.
## Network token

 - [POST /tokens/network](https://docs.worldpay.com/access/products/tokens/openapi/network-token/provisionnetworktoken.md): Request to provision a network token.
 - [GET /tokens/network/{tokenReference}](https://docs.worldpay.com/access/products/tokens/openapi/network-token/getnetworktoken.md): Retrieve the detail for this network token.
 - [DELETE /tokens/network/{tokenNumber}](https://docs.worldpay.com/access/products/tokens/openapi/network-token/deletesecuritynetworktoken.md): Deleting a network token based on a token number. Supports Visa, Mastercard, and Discover network token deletion, but not American Express.
 - [POST /tokens/network/cryptograms](https://docs.worldpay.com/access/products/tokens/openapi/network-token/getnetworktokencryptogram.md): A network token cryptogram is a one-time value generated for a single payment authorization attempt using the network token. It helps to prove that the network token is valid and being used by an auth
