Vault: Tokenize

Our Server-to-Server API to tokenize card numbers, CVV codes and more.

The Vault API allows you to directly interact with the PCI Proxy token vault. Simply pass your data directly from your server to the Vault endpoint to replace them with tokens. The API supports single as well as bulk tokenization for credit card numbers, CVCs and custom values. The Vault API can also be used to create Network Tokens directly from your server.

For bulk tokenizations and de-tokenizations, the maximum number of requests per batch is 100.

To Collect sensitive data through client-side applications, use our Secure Fields or Mobile SDK solutions. On the other end, use the Show API to reveal sensitive data in those applications.

Request access

📘

This feature is only available by request and subject to approval by us.

Contact us to request use of the Vault. We will review your request and activate it for you if we are satisfied with your use case.

Quick start example

The Vault API works with our Tokenize end-point:

/* PAN, CVV, CUSTOM example */
curl --request POST \
  --url 'https://api.sandbox.datatrans.com/v1/aliases/tokenize' \
  --header 'Authorization: Basic {{basicAuth}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "requests": [
        {
            "type": "CARD",
            "pan": "4242424242424242",
            "expiryMonth": "05",
            "expiryYear": "21"            
        },
        {
            "type": "CVV",
            "cvv": "123"
        },
        {
            "type": "CUSTOM",
            "custom": "John Doe"
        }
    ]
}'
/* bulk PAN tokenization example. Maximum 100 cards per request are allowed. */ 
curl --request POST \
  --url 'https://api.sandbox.datatrans.com/v1/aliases/tokenize' \
  --header 'Authorization: Basic {{basicAuth}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "requests": [
        {
            "type": "CARD",
            "pan": "4242424242424242",
            "expiryMonth": "05",
            "expiryYear": "21"
            
        },
        {
            "type": "CARD",
            "pan": "4111111111111111",
            "expiryMonth": "05",
            "expiryYear": "21"            
        }
    ]
}'
/* Tokenization and Network token creation request example*/
curl --request POST \
  --url 'https://api.sandbox.datatrans.com/v1/aliases/tokenize' \
  --header 'Authorization: Basic {{basicAuth}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "requests": [
        {
            "type": "CARD",
            "pan": "4343434343434345",
            "expiryMonth": "05",
            "expiryYear": "21",
            "networkTokenOptions": {
                "createNetworkToken": true
            }
        }
    ]
}'

You can submit mixed types and several at a time. Your tokens are returned with a summary of the result:

/* PAN, CVV, CUSTOM response example */
{
    "overview": {
        "total": 3,
        "successful": 3,
        "failed": 0
    },
    "responses": [
        {
            "type": "CARD",
            "alias": "AGhFLt-mj0BfI3XN",
            "maskedCC": "424242xxxxxx4242",
            "fingerprint": "F-dV5V8dE0SZLoTurWbq2HZp"            
        },
        {
            "type": "CVV",
            "alias": "Il2ob3L2QgqoxvkqCi0UcJw5",
            "expiryDate": "2024-06-02T09:52:08Z"
        },
        {
            "type": "CUSTOM",
            "alias": "3_FtAG15RdCcRb-gC8tBwg=="
        }
    ]
}
/* Bulk tokenization response example */
{
    "overview": {
        "total": 2,
        "successful": 2,
        "failed": 0
    },
    "responses": [
        {
            "type": "CARD",
            "alias": "AGhFLt-mj0BfI3XN",
            "maskedCC": "424242xxxxxx4242",
            "fingerprint": "F-dV5V8dE0SZLoTurWbq2HZp"
        },
        {
            "type": "CARD",
            "alias": "ZSdsLftmj05dJ2sS",
            "maskedCC": "4111111xxxxxx4111",
            "fingerprint": "F-cdM3UzoW6PeJHJkKmT_cQ8"
        }
    ]
}
/* Tokenization and Network token creation response example.
The Network token will be stored behind the PCI Proxy alias.
*/
{
    "overview": {
        "total": 1,
        "successful": 1,
        "failed": 0
    },
    "responses": [
        {
            "type": "CARD",
            "alias": "AGhFLt-mj0BfI3XN",
            "maskedCC": "434343xxxxxx4345",
            "fingerprint": "F-dV5V8dE0SZLoTurWbq2HZp",
            "networkTokenInfo": {
                "tokenCreated": true
            }
        }
    ]
}