Get started
Modes and errors
Test and live mode, the shape of responses, error codes, limits, and the right way to retry.
Test and live mode
Every create call accepts "env": "test" or "live". Always set it: the default differs from one endpoint to another.
| Endpoint | Without env | Test mode |
|---|---|---|
POST /payments | test | yes |
POST /payouts/links | live | yes |
POST /terminal/payments | live | yes (the screen offers “Simulate”) |
POST /disburse/initiate | live | no: real money, always |
POST /payouts/crypto | live | no: real crypto, always |
| Test mode | Live mode | |
|---|---|---|
| Money | nothing is charged or paid out | real payments, real payouts |
| Mobile Money | a “Simulate payment” button | the customer’s real number and PIN |
| Crypto | a “Simulate payment” button | a real on-chain transfer |
| Webhooks | sent and signed, with "mode": "test" | sent and signed, with "mode": "live" |
The sheet shows Test mode when the operation is in test. Responses and webhooks always state the mode (env or mode): check it before delivering.
Responses
A successful response has "success": true, with 200 (read, done) or 201 (created). An error has "success": false and a clear message you can show as is:
{ "success": false, "message": "Solde insuffisant sur le pays TG.", "balance": 4200, "required": 5170, "fee": 170 }A field error returns 422 with details in errors:
{
"message": "Le champ amount doit être au moins 100.",
"errors": { "amount": ["Le champ amount doit être au moins 100."] }
}HTTP codes
| Code | Meaning | What to do |
|---|---|---|
200, 201 | success (201: created) | read the response |
400 | request refused: unsupported network or country, insufficient balance for a payout, network refusal | read message; do not retry as is |
401 | missing or wrong keys | check both headers and your environment variables |
403 | account suspended | contact support from your account |
404 | not found, or belongs to another app | check the identifier and the keys used |
409 | the operation can no longer be done (already paid, for example) | read the status again |
410 | method removed ("error": "method_removed") | use the sheet: see removed methods |
422 | missing or invalid field (errors), or impossible request explained in message | fix the request |
423 | payouts suspended by an account security check | contact support |
429 | too many requests | wait for the seconds in the Retry-After header |
5xx | error on Tchin’s side | retry later with increasing delay; see statut.tchin.tech |
Limits
| Limit | Value |
|---|---|
| Requests | 120 per minute per public key, and 300 per minute per IP address |
| A payment | from 100 to 100,000,000 CFA |
| A Mobile Money payout | 200 CFA minimum, within the recipient network’s limits |
| Receive (customer’s choice) | Mobile Money from 500 to 1,500,000 CFA; in crypto, the chosen coin’s minimum |
| An in-store payment | from 200 to 500,000 CFA |
| Webhooks | to a public HTTPS URL only |
Retrying safely
- Timeout: allow 30 seconds per call. A payout can take a few seconds.
- Retry only on
429,5xxor a network failure, with growing delays (1 s, 5 s, 30 s…). Never on400,401,404or422. - Nothing twice: one payment per order, keep its token. A crypto payout carries your
reference: the same reference only sends once. A Mobile Money payout takes two calls: only callsubmitagain if the status tells you to. - Source of truth: the status is read from your server (signed webhook or status call), never from the customer’s page.