Documentation
Card API
Server-to-server card payment API reference for The Payment Company, including the endpoint, request fields, payload layout, and sample responses.
API Endpoint
Live APIProduction environment
POST
https://api.thepayment.company/api/v1/live/cardTest APISandbox environment
POST
https://api.thepayment.company/api/v1/test/cardRequest Fields
| Parameter | Type | Description | Required |
|---|---|---|---|
first_name | String | Given name of the cardholder | Yes |
last_name | String | Family name of the cardholder | Yes |
email | String | Customer email address | Yes |
address | String | Billing street address | Yes |
country | String | Country code in ISO 3166-1 alpha-3 format | Yes |
city | String | Cardholder city | Yes |
state | String | Cardholder state or region | Yes |
zip | String | ZIP or postal code | Yes |
ip_address | String | Customer IP address | Yes |
phone_number | String | Cardholder phone number | Yes |
amount | Number | Payment amount in the smallest currency unit | Yes |
currency | String | Currency code in ISO 4217 format | Yes |
card_number | String | Credit or debit card number | Yes |
card_expiry_month | String | Card expiry month in MM format | Yes |
card_expiry_year | String | Card expiry year in YYYY format | Yes |
card_cvv | String | Card CVV or security code | Yes |
redirect_url | String | URL where the customer is sent after payment | Yes |
webhook_url | String | URL used for server-to-server webhook updates | NO |
order_id | String | Merchant-side unique order reference | NO |
terminal_id | String | Unique connector terminal ID, useful when selecting a primary or fallback connector | NO |
Payload
Send the request payload as JSON. The sample structure is shown below:
Sample Responses
Integration Notes
Encrypted payment APIs must use AES-256-CBC before transmitting sensitive fields. Authentication, headers, encryption steps, and sample implementations for Node.js, PHP, Python, and Java are documented in Integration Examples.