Standalone API

Request clear text Network Tokens and Cryptogram

Request a plain text Network Token for a given PAN directly with the Network Token standalone API.
With this approach you receive the clear text Network Token together with the Network Token expiry date directly in the response of the API. Next to that you will still receive our alias v2 format as it is required for all subsequent Network Token related operations such as requesting the cryptogram, receiving update notifications or checking on the status of a Network Token.

🚧

Access

As we are returning sensitive payment information this feature is only available upon request and subject to approval by us. Please get in touch with our team to activate it for you.

Request Network Token

Request a Network Token with clear text card input. Please refer to the API Reference to get a detailed view of all required and optional fields.

curl -L -X POST 'https://api.sandbox.datatrans.com/v1/aliases/tokenize' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic {PCIP merchantId}:{API password}' \
--data-raw '{
    "requests": [
        {
            "type": "CARD",
            "pan": "371111111111114",
            "expiryMonth": "12",
            "expiryYear": "30",
            "cardholder": {
                "ipAddress": "127.0.0.2",
                "phoneNumber": "+11234567899",
                "emailAddress": "[email protected]"
            },
            "networkTokenOptions": {
                "createNetworkToken": true
            }
        }
    ]
}'
{
    "overview": {
        "total": 1,
        "successful": 1,
        "failed": 0
    },
    "responses": [
        {
            "type": "CARD",
            "alias": "7LHXscqwAAEAAAGQpsEJKWu3d8zmAMi7",
            "maskedCC": "371111xxxxx1114",
            "fingerprint": "F-ccXvZRmYhU4xGpVoQJ5ASw",
            "networkToken": {
                "status": "ACTIVE",
                "tokenCreated": true,
                "token": "377777777777770",
                "expiryMonth": "07",
                "expiryYear": "40"
            }
        }
    ]
}
}

🚧

Mandatory data for Network Token provisioning

Next to the PAN, adding the expiry date is required when you want to provision a Network Token (VTS, MDES, AETS).

Additionally for AMEX the ipAddress and either phoneNumber or emailAddress of the cardholder is required to successfully provision an AMEX token.


📘

For any further downstream operation (requesting Network Token status or a cryptogram) please use the PCI Proxy alias.

Request Cryptogram

Specify in your request if you want to de-tokenise into a Network Token and/or cryptogram. Please refer to the API Reference to get a detailed view of all required and optional fields.

curl -L -X POST 'https://api.sandbox.datatrans.com/v1/aliases/detokenize' \
-H 'Authorization: Basic {PCIP merchantId}:{API password}' \
-H 'Content-Type: application/json' \
--data-raw '{
    "requests": [
        {
            "type": "CARD",
            "alias": "WCCx4SHgAAEAAAGJCu5p4HzJVqexAKTm",
            "networkTokenOptions": {
                "returnNetworkToken": true,
                "returnCryptogram": true
            }
        }
    ]
}'
{
    "overview": {
        "total": 1,
        "successful": 1,
        "failed": 0
    },
    "responses": [
        {
            "type": "CARD",
            "networkToken": {
                "token": "4622829030002523",
                "cryptogram": "AgAAAAAA51AlmmsAmZpHgrgAAAA=",
                "eci": "07",
                "expiryMonth": "07",
                "expiryYear": "27"
            }
        }
    ]
}