TchokoPay
API Reference

Create a checkout

POST /v1/collect/checkout — create a hosted checkout page and get a link.

POST/v1/collect/checkout

Creates a payment and returns a hosted checkout link. Redirect your customer there — they pick their own payment method and complete the payment on TchokoPay's page.

Request

curl -X POST https://connect.tchokopay.com/v1/collect/checkout \
  -H "Authorization: Bearer tchoko_live_..." \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-4821-attempt-1" \
  -d '{
    "amount": 5000,
    "currency": "XAF",
    "description": "Order #4821",
    "merchantReference": "order_4821",
    "expiresInMinutes": 60
  }'

Body parameters

FieldTypeRequiredDescription
amountnumberrequiredThe amount, in currency. Decimals are allowed where the currency supports them (e.g. 49.99 for USD) — more precision than the currency actually has is rejected, not silently rounded.
currencystringrequiredAny active currency code — XAF, USD, NGN, BTC, etc. There's no fixed settlement currency to match — see Multi-currency.
descriptionstringoptionalShown to the payer on the checkout page. Defaults to "Payment to {your business name}". Max 200 characters.
merchantReferencestringoptionalYour own order/invoice ID for your own reconciliation. Echoed back as merchantReference. Not used for routing or deduplication. Max 120 characters.
expiresInMinutesintegeroptionalHow long the checkout link stays payable. Default 60, max 10080 (7 days).

Headers

HeaderRequiredDescription
AuthorizationrequiredBearer tchoko_live_...
Content-Typerequiredapplication/json
Idempotency-KeyrecommendedAny string you choose, max 200 characters. Retrying with the same key returns the same payment — see Idempotency & retries.

Response

201 Created

{
  "reference": "REQ-1785296850838-A5303B",
  "status": "PENDING",
  "amount": 5000,
  "currency": "XAF",
  "requestedAmount": 5000,
  "requestedCurrency": "XAF",
  "description": "Order #4821",
  "merchantReference": "order_4821",
  "checkoutUrl": "https://tchokopay.com/pay/REQ-1785296850838-A5303B",
  "method": null,
  "providerCode": null,
  "expiresAt": "2026-07-30T10:00:00.000Z",
  "createdAt": "2026-07-30T09:00:00.000Z",
  "failureCategory": null
}
FieldDescription
referenceTchokoPay's own reference for this payment. Use it to check status or look it up later.
statusPENDING right after creation. See Payment status lifecycle.
amount / currencyWhat this payment is worth right now. Before payment, identical to requestedAmount/requestedCurrency; after payment, the real amount that actually settled into your wallet.
requestedAmount / requestedCurrencyThe price you asked for, fixed for the life of the payment.
merchantReferenceEchoes back the reference you sent, or null if you didn't send one.
checkoutUrlSend your customer here. null once the payment is no longer payable.
methodThe payment class — MOBILE_MONEY, CARD, CRYPTO. null until your customer has chosen. It is the same value for every mobile money network, so it cannot tell you which one paid.
providerCodeWhich network actually paid — mtn_cm, orange_cm, lightning. null until your customer has chosen. This is the field to branch on, not method.
expiresAtWhen the checkout link stops accepting payment.
failureCategorynull unless status is FAILED — see Failure categories.

Errors

StatusMeaning
400Validation error — bad amount, unknown currency, too much decimal precision, Idempotency-Key too long.
401Missing, invalid, or revoked API key.
403Account not approved, or the merchant API is temporarily disabled platform-wide.
429Rate limit hit — see Errors & rate limits.

On this page