The Payment Company Logo

ApmApi

APM API

Alternative Payment Methods (APM) API reference for The Payment Company, covering the endpoint, request fields, payload structure, and sample responses.

SectionApmApi
Topics05
PathapmApi

API Endpoint

Live APIProduction environment
POSThttps://api.thepayment.company/api/v1/live/apm
Test APISandbox environment
POSThttps://api.thepayment.company/api/v1/test/apm

Request Fields

ParameterTypeDescriptionRequired
first_nameStringGiven name of the payerYes
last_nameStringFamily name of the payerYes
emailStringCustomer email addressYes
addressStringBilling street addressYes
countryStringCountry code in ISO 3166-1 alpha-3 formatYes
cityStringPayer cityYes
stateStringPayer state or regionYes
zipStringZIP or postal codeYes
ip_addressStringCustomer IP addressYes
phone_numberStringPayer phone numberYes
amountNumberPayment amount in the smallest currency unitYes
currencyStringCurrency code in ISO 4217 formatYes
redirect_urlStringURL where the customer is sent after paymentYes
webhook_urlStringURL used for server-to-server webhook updatesNo
order_idStringMerchant-side unique order referenceNo
terminal_idStringUnique connector terminal ID, useful when choosing a primary or fallback connectorNo

Payload

Send the request payload as JSON. The sample structure is shown below:

{
"first_name": "James",
"last_name": "Karlo",
"email": "james.karlo@gmail.com",
"address": "Drovers,Llandrindod Wells",
"country": "GB",
"city": "London",
"state": "PW",
"zip": "LD1 5PT",
"ip_address": "127.0.0.1",
"phone_number": "6567453421",
"amount": 10,
"currency": "USD",
"redirect_url": "https://thepayment.company",
"webhook_url": "https://webhook.url",
"order_id": "Te52643",
"terminal_id": "T56353"
}

Sample Responses

{
"status": "REDIRECT",
"message": "Please redirect user to complete the payment.",
"redirect_url": "https://api.thepayment.company/api/v1/test/apm/checkout/AP0186280974141637",
"data": {
  "amount": 10,
  "currency": "USD",
  "order_id": "Te52643",
  "transaction_id": "AP0186280974141637",
  "customer": {
    "first_name": "James",
    "last_name": "Karlo",
    "email": "james.karlo@gmail.com"
  },
  "refund": {
    "status": false,
    "refund_date": null
  },
  "chargeback": {
    "status": false,
    "chargeback_date": null
  }
}
}

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.

On this page