Skip to main content

Detokenization Integration

To begin using this service, you simply need to make a few modifications to the code that is constructing your HTTPS POST to the 3rd-party endpoint.

  1. Update the URL to POST to TokenEx
  2. Add HTTP Header for the intended URL
    • TX_URL
  3. Add your Authentication Headers
    • TX_TokenExID
    • TX_APIKey
  4. Wrap the field in the HTTP Body with three curly braces
    • example: {{{424242XXXXXX4242}}}
  5. (Optional) To inject a CVV that was previously collected by TokenEx, insert the cvv placeholder as shown below. The placeholder is the lowercase string "cvv" wrapped with three sets of curly braces.
    • example: {{{cvv}}}

HTTP Request Headers

HeaderDescription
TX_TokenExIDYour TokenEx ID.
TX_APIKeyYour API Key.
TX_URLThe endpoint URL to which TokenEx should POST the detokenized request.
TX_Headers(Optional) Comma-separated list of desired headers received from the endpoint
TX_CacheCvv(Optional) Sending 'true' will cache the CVV for 5 minutes allowing additional attempts with the CVV after a failed transaction

Detokenization Examples - JSON

POST https://test-api.tokenex.com/TransparentGatewayAPI HTTP/1.1
Content-Type: application/json
TX_URL: https://www.example.com
TX_TokenExID: YourTokenExID
TX_APIKey: YourAPIKey

{
"card": {
"type": "MC ",
"number": "{{{545454587415454}}}",
"expDate": "1126",
"cardValidationNum": "123"
}
}

Detokenization Examples - XML

POST https://test-api.tokenex.com/TransparentGatewayAPI HTTP/1.1
Content-Type: text/xml
TX_URL: https://www.example.com
TX_TokenExID: YourTokenExID
TX_APIKey: YourAPIKey

<card>
<type>MC</type>
<number>{{{545454587415454}}}</number>
<expDate>1126</expDate>
<cardValidationNum>123</cardValidationNum>
</card>

Detokenization Examples - Form POST

POST https://test-api.tokenex.com/TransparentGatewayAPI HTTP/1.1
Content-Type: application/x-www-form-URLencoded
TX_URL: https://www.example.com
TX_TokenExID: YourTokenExID
TX_APIKey: YourAPIKey

type=MC&number={{{545454587415454}}}&expDate=1112&cardValidationNum=123