Getting Started
Overview
Reference overview of The Payment Company API documentation, including environments, authentication, and the recommended API request structure.
Welcome
This documentation explains how to integrate with The Payment Company APIs for card payments, hosted checkout, alternative payment methods (APMs), payouts, payment links, crypto services, and more.
The sidebar organizes endpoints by product area. Each API page includes live and test URLs, request fields, sample payloads, and response examples.
Environments
| Environment | Purpose |
|---|---|
| Live | Production traffic and real money movement |
| Test | Sandbox integration using test credentials and test cards |
All API requests use the following base URL:
Live and test paths are appended to this base URL on each API page. For example, /api/v1/live/card is used for live card payments and /api/v1/test/card is used for test traffic.
Authentication
Every request must include your secret key in the Authorization header:
These keys are available in the merchant dashboard under Settings → API & Webhooks:
| Key | Use with |
|---|---|
| Test Secret Key | Sandbox APIs (paths containing /test/, for example /api/v1/test/card) |
| Live Secret Key | Live APIs (paths containing /live/, for example /api/v1/live/card) |
Replace YOUR_SECRET_KEY with the key corresponding to the target environment. Secret keys and encryption keys must not be exposed in client-side code or public repositories.
Request Format
Headers
| Header | Value |
|---|---|
Content-Type | application/json |
Authorization | Bearer YOUR_SECRET_KEY (Test Secret Key or Live Secret Key from Settings → API & Webhooks) |
Encrypted APIs (card, hosted, APM, payout, crypto payin, etc.)
Many payment APIs accept sensitive information. You must:
- Build a JSON payload with the fields described on the API page.
- Encrypt the JSON string with AES-256-CBC by using your encryption key and a random 16-byte IV.
- Send the encrypted result in the request body:
The IV and ciphertext are combined as hexadecimal strings separated by a colon (:). Full encryption steps and code samples are available in Integration Examples.
Standard JSON APIs
Some endpoints, such as transaction lists, wallet details, or status checks, accept a standard JSON body or query parameters without encryption. Those pages define the exact request shape; send JSON directly when encryption is not required.
How to Read Each API Page
- API Endpoint — Live and test URLs for the operation.
- Parameters — Required and optional request fields.
- Payload — Sample JSON before encryption, where applicable.
- Example Responses — Sample success and failure responses.
- Integration — Link to shared encryption guidance and code examples for encrypted APIs.
Additional Resources
- Integration Examples — AES-256-CBC encryption guidance and examples for Node.js, PHP, Python, and Java
- Testing Cards — Sandbox card numbers for test payments
- Webhooks — Server-to-server transaction notifications