The Payment Company Logo

Getting Started

Overview

Reference overview of The Payment Company API documentation, including environments, authentication, and the recommended API request structure.

SectionGetting Started
Topics09
Pathgetting-started / introduction

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

EnvironmentPurpose
LiveProduction traffic and real money movement
TestSandbox integration using test credentials and test cards

All API requests use the following base URL:

https://api.thepayment.company

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:

Authorization: Bearer YOUR_SECRET_KEY

These keys are available in the merchant dashboard under Settings → API & Webhooks:

KeyUse with
Test Secret KeySandbox APIs (paths containing /test/, for example /api/v1/test/card)
Live Secret KeyLive 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

HeaderValue
Content-Typeapplication/json
AuthorizationBearer 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:

  1. Build a JSON payload with the fields described on the API page.
  2. Encrypt the JSON string with AES-256-CBC by using your encryption key and a random 16-byte IV.
  3. Send the encrypted result in the request body:
{
  "payload": "<iv_hex>:<ciphertext_hex>"
}

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

  1. API Endpoint — Live and test URLs for the operation.
  2. Parameters — Required and optional request fields.
  3. Payload — Sample JSON before encryption, where applicable.
  4. Example Responses — Sample success and failure responses.
  5. 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

On this page