Getting Started
Integration Samples
AES-256-CBC encryption guidance and integration examples in Node.js, PHP, Python, and Java for The Payment Company APIs.
Integration Walkthroughs
The API uses AES-256-CBC encryption to protect sensitive data during transmission. Before sending the payload, encrypt it with your encryption key and a dynamically generated initialization vector (IV). The encrypted payload and IV must then be sent to the API so the server can decrypt the request correctly. This keeps sensitive information, such as card data, secure while in transit.
Each example demonstrates how to:
- Encrypt the payload with AES-256-CBC.
- Generate a random IV.
- Include both the encrypted data and IV in the API request.
Encryption key
The encryption key is used with the examples above to encrypt and decrypt sensitive request payloads (AES-256-CBC). You need the same key on your server when building encrypted API calls.
Find it in the merchant dashboard under Settings → API Keys & Webhooks. Use that value wherever the sample code refers to your encryption key. Store it securely—never commit it to source control or expose it in client-side code.