> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://ixopay.ferndocs.com/modules/token-ex/detokenization-and-tokenization-integration/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://ixopay.ferndocs.com/_mcp/server. # Detokenization and Tokenization 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 * [https://test-api.tokenex.com/TransparentGatewayAPI/Detokenize](https://test-api.tokenex.com/TransparentGatewayAPI/Detokenize) 2. Add HTTP Header for the intended URL * TX\_URL 3. Add your Authentication Headers * TX\_TokenExID * TX\_APIKey 4. Add an HTTP Header to locate the sensitive data within the response to be tokenized using a regular expression * TX\_ResponseField 5. Add an HTTP header to apply a token scheme to the data located in the response to be tokenized * TX\_TokenScheme 6. Wrap the field in the HTTP Body with three curly braces * example: `{{{424242XXXXXX4242}}}` HTTP Request Headers | Header | Description | | ----------------- | -------------------------------------------------------------------------------------------------- | | TX\_TokenExID | Your TokenExID | | TX\_APIKey | Your API key | | TX\_URL | The endpoint URL to which TokenEx should POST the detokenized request | | TX\_ResponseField | A regular expression to locate the data element in the response to be tokenized | | TX\_TokenScheme | see [Token Schemes](https://documentation.ixopay.com/modules/docs/tokenex/universal-token-schemes) | | TX\_Headers | (Optional) Comma-separated list of desired headers received from the endpoint | HTTP Response Headers | Header | Description | | ------------------------- | ----------------------------------------------------------------------------------------------------- | | tx\_Message | Informational message about the request. Number of possible matches based on Regular Expression, etc. | | tx\_tokenize\_error\_xxxx | Reports any error in tokenization | | tx\_thirdpartystatuscode | The status code received from the third party defined in the tx-url request header | | tx\_tokenexstatuscode | The status code for the request to TokenEx |