Detokenization and Tokenization Example

The adjacent example will detokenize the token in the cardNumber field (411111KOQL3N1111), and tokenize the value in the password field (secret) using token scheme 22.

POST /TransparentGatewayAPI/Detokenize HTTP/1.1
Host: test-api.tokenex.com
Content-Type: application/json
Accept: application/json
TX_URL: https://www.example.com
TX_TokenExID: YourTokenExID
TX_APIKey: YourAPIKey
TX_ResponseField: (?:"password": ")(.*)(?:")
TX_TokenScheme: 22

{
    "createTransactionRequest": {
        "merchantAuthentication": {
            "name": "API_LOGIN_ID",
            "transactionKey": "API_TRANSACTION_KEY"
        },
        "refId": "123456",
        "transactionRequest": {
            "transactionType": "authCaptureTransaction",
            "amount": "5",
            "payment": {
                "creditCard": {
                    "cardNumber": "{{{411111KOQL3N1111}}}",
                    "expirationDate": "2026-12",
                    "cardCode": "123"
                }
            },
            "customer": {
                "id": "99999456654"
            }
        }
    },
    "transactionResponse": {
    	"password": "secret"
    }
}