Skip to content
Docs
FR Create an account

Get started

API keys

Two keys per app, sent in two headers. They stay on your server, always.

Base URL and formats

https://tchin.tech/api/v1
WhatFormat
RequestsJSON, with Content-Type: application/json (form data is accepted too).
ResponsesJSON in UTF-8. Send Accept: application/json so validation errors come back as JSON.
CFA amountsintegers, no decimals: 25000.
Crypto amountsdecimal numbers, up to 6 decimals: 12.5.
DatesISO 8601 in UTC: 2026-11-23T14:05:12+00:00.
Countriestwo-letter ISO codes: TG, BJ, BF.

Always call over HTTPS: an http:// URL is redirected, and a redirected POST loses its body.

Headers

HeaderValue
TCHIN-PUBLIC-KEYyour app’s public key (tchin_pk_…)
TCHIN-PRIVATE-KEYits secret key (tchin_sk_…)
Content-Typeapplication/json (for a POST)
Acceptapplication/json
A call with your keys
curl https://tchin.tech/api/v1/balance \
  -H "TCHIN-PUBLIC-KEY: $TCHIN_PUBLIC_KEY" \
  -H "TCHIN-PRIVATE-KEY: $TCHIN_PRIVATE_KEY" \
  -H "Accept: application/json"
$ch = curl_init('https://tchin.tech/api/v1/balance');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'TCHIN-PUBLIC-KEY: '.getenv('TCHIN_PUBLIC_KEY'),
        'TCHIN-PRIVATE-KEY: '.getenv('TCHIN_PRIVATE_KEY'),
        'Accept: application/json',
    ],
]);
$solde = json_decode(curl_exec($ch), true);
const r = await fetch('https://tchin.tech/api/v1/balance', {
  headers: {
    'TCHIN-PUBLIC-KEY': process.env.TCHIN_PUBLIC_KEY,
    'TCHIN-PRIVATE-KEY': process.env.TCHIN_PRIVATE_KEY,
    'Accept': 'application/json',
  },
});
const solde = await r.json();
import os, requests

r = requests.get('https://tchin.tech/api/v1/balance', timeout=30, headers={
    'TCHIN-PUBLIC-KEY': os.environ['TCHIN_PUBLIC_KEY'],
    'TCHIN-PRIVATE-KEY': os.environ['TCHIN_PRIVATE_KEY'],
    'Accept': 'application/json',
})
solde = r.json()

Viewing your keys

  1. Open tchin.tech/api and tap your app.
  2. Tap View keys (or the key icon on the app’s row).
  3. Confirm with your Tchin PIN or biometrics: it is asked every time.
  • Each app has its own pair. An operation created with one pair belongs to that app only: another app’s token returns 404.
  • The same keys work in test and live mode: the env field of each create call decides.
  • Editing the app (image, methods, fees) does not change the keys: your code stays the same.

Keeping them safe

  • In your server’s environment variables or its secrets manager. Never in a web page, a mobile app, a Git repository, a message or a screenshot.
  • In your logs: the time, the endpoint, the HTTP code and the message. Never the keys.
  • Your page and your mobile app only ever receive a token.

If a key leaks

  1. Create a new app with the same methods, fees and webhook URL.
  2. Put its keys on your server.
  3. Delete the old app: its keys stop working immediately.
Warning
Nobody at Tchin will ever ask for your secret key, by WhatsApp or email. Never share it.