Skip to content
Docs
FR Create an account

Get started

The Tchin API

Accept Mobile Money and crypto without your customer ever leaving your website or app. Send payouts, take in-store payments and track everything by webhook: one integration, the same keys.

How it works, in four steps

Every Tchin operation follows the same path. Once you understand it for a payment, you can do everything.

  1. Your server creates the operation. It calls the API with your two keys: the amount, a description, your webhook URL. Tchin replies with a token, a short identifier that holds no secret.
  2. Your page opens the Tchin sheet. With that token, the web kit (one script tag) or your mobile kit opens the sheet: a Tchin window that slides up over your page. The customer is never redirected.
  3. The customer pays in the sheet. Mobile Money or crypto: the sheet guides every step and shows your app’s name and image.
  4. Your server is notified. Tchin calls your callback_url with a webhook signed with your secret key. That is where, and only where, you deliver.
Good to know
Your keys stay on your server. Your page and your mobile app only ever see the token: even if copied, it can neither read your account nor move money.

Key terms

TermWhat it is
Appyour website or service as Tchin sees it: a name and an image (your customers see them), the accepted methods, who pays the fees, a webhook URL and a key pair. Create them on the API page of your account.
Public keytchin_pk_…: identifies your app. Header TCHIN-PUBLIC-KEY.
Secret keytchin_sk_…: proves the call comes from you and signs your webhooks. Header TCHIN-PRIVATE-KEY. It never leaves your server.
Tokenthe identifier of an operation (14 letters and digits for a payment: jtkkbphr7azsn3). It opens the sheet and is used to track the status.
Sheetthe Tchin window opened over your page by TchinPay.open() (pay) or TchinPay.receive() (receive).
Payment pagepayment_url: the same thing as a full page, for a link in an email or a message.
Webhookthe call Tchin makes to your server when an operation changes status, signed with your secret key.
Test and live mode"env": "test": everything works as in real life, with no money. "env": "live": real payments. The same keys work for both.
Balancethe money in your Tchin account: one balance per country in CFA francs (Togo, Benin, Burkina Faso) and one balance in your account’s crypto.

What you can build

Countries and methods

Tchin collects and pays out in CFA francs (XOF) in three countries, and in crypto worldwide.

CountryMobile MoneyCodes
TGTogo: Yas, Moovt-money-togo, moov-togo
BJBenin: MTN, Moov, Celtiis Cashmtn-benin, moov-benin, celtiis-benin
BFBurkina Faso: Orange Money, Moovorange-money-burkina, moov-burkina

In crypto, the customer pays with the coin of their choice from their wallet; you receive it in your account’s crypto (TRX, BNB, SOL or GRAM). The live list, network by network, is available from GET /api/v1/methods.

Fees

Current rates are on tchin.tech/tarifs, and GET /api/v1/methods always returns those of your account (an account can have negotiated rates). In your app settings, you choose who pays the fees:

  • On payments: the customer (fees are added to the price, you receive exactly your price) or you (the customer pays the price, fees are taken from what you receive). A single payment can also decide with fees_on_customer.
  • On payouts: you (the recipient gets exactly the amount) or the recipient (fees are taken from the amount).

Security in short

  • API calls are made from your server, over HTTPS, with your two keys. Never from a web page or a mobile app.
  • A payment is only paid once your server confirms it: through the signed webhook, or GET /api/v1/payments/{token}/status. The page callback (onSuccess) is for display only.
  • Webhooks are only sent to a public HTTPS URL, signed with HMAC-SHA256 using your secret key and timestamped: a replayed message is detected.
  • A confirmed payment is final: Tchin does not refund. The sheet tells the customer before they pay.

Questions?

Message us on WhatsApp at +228 73 38 49 90, or ask Letou, the assistant in your Tchin account: it knows this documentation and writes the code with you. Service status is on statut.tchin.tech.