Ab API bu sa ekip di bëgg ci dëgg-dëgg
REST bu ñu mëna xalaat, caabi idempotency, webhook yu ñu sinye ak ab sandbox bu ame yoon yu ñu simule, ngir nga mëna integre lépp balaa benn frang di yëngu.
Sa jot xaalis bu njëkk ak benn laaj rekk
REST bu set, JSON bu ñu mëna xalaat ak request id ci tontu bu nekk. Sandbox bi mel na ni production bi: benn API, benn nekkin, benn webhook.
- Caabi sandbox ak production, ku nekk ak sa app
- Webhook yu ñu sinye ak HMAC, ak aar ci replay
- Caabi idempotency ci woote bu nekk bu yëngal xaalis
- Njumte yu ñu tënk yu lay wax lu mu war a defaraat
- Wone OpenAPI, mbooloo Postman ak llms.txt, ñépp génn nañu
- Session fey yu ñu teg ak callback yu tallal ngir jokkukaay CRM, ERP ak bitik
curl https://api.capayglobal.com/v1/collections \
-H "Authorization: Bearer sk_test_..." \
-H "Idempotency-Key: 9f1c-collect-01" \
-H "Content-Type: application/json" \
-d '{
"amount": "2500",
"currency": "XAF",
"country": "CM",
"method": "mobile_money",
"msisdn": "2376XXXXXXXX",
"merchant_reference": "order-1042"
}'{
"status": "success",
"data": {
"id": "col_9xKQ2mD41Vb8",
"object": "collection",
"status": "pending",
"amount": "2500",
"currency": "XAF",
"country": "CM",
"method": "mobile_money",
"merchant_reference": "order-1042",
"fees": {
"platform_fee": "50",
"provider_fee": "0",
"total_fee": "50",
"bearer": "merchant"
},
"net_amount": null,
"livemode": false,
"created_at": "2026-08-30T12:04:11Z"
},
"request_id": "req_b0f3d2c1"
}Sa ndajale bu njëkk
Benn ñaan dafay sos xalaat u fey, delloo id u ñaan te, ci xaalisu telefon, yónnee ñaan bi ci telefonu feykat bi. Sandbox dafay doxe ni produksioŋ ci dëgg.
curl -X POST https://api.capayglobal.com/v1/collections \
-H "Authorization: Bearer sk_test_XXXXXXXXXXXX" \
-H "Idempotency-Key: col-order-10482-a1b2c3" \
-H "Content-Type: application/json" \
-d '{
"amount": "5000",
"currency": "XAF",
"country": "CM",
"method": "mobile_money",
"msisdn": "+237650000001",
"merchant_reference": "order-10482"
}'{
"status": "success",
"data": {
"id": "col_7Qm3k1Xa9Zr4",
"object": "collection",
"status": "pending",
"amount": "5000",
"currency": "XAF",
"auth_model": "STK_PROMPT",
"livemode": false
},
"request_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}SDK u serwëer
Ay muur yu sew yu am xeet ci kaw benn API REST bu bokk, ak idempotency ak seetlu xaatim ci biir.
import { Capay } from '@capay/sdk';Nekkatul ci npm ba tey. Rëddu import bi ci kaw mooy bu mujj bi, kon sa integrasioŋ du soppiku bu ñu ko génnee.
Jàng jukki bifrom capay import CapayNekkatul ci PyPI ba tey. Rëddu import bi ci kaw mooy bu mujj bi, kon sa integrasioŋ du soppiku bu ñu ko génnee.
Jàng jukki biuse Capay\CapayClient;Nekkatul ci Packagist ba tey. Rëddu import bi ci kaw mooy bu mujj bi, kon sa integrasioŋ du soppiku bu ñu ko génnee.
Jàng jukki biSeetlu webhook bu ne
Xaatim yi dañu leen di xayma ci yaram bu tuub bi te mengale ci jamono ju sax, te benn màndarga u jamono bu ëpp 300 saa dañu koy bàyyi. Bul wóolu benn webhook bu nga seetlu wul.
# T is the t= value from X-Capay-Signature; delivery.json is the raw body as received.
T=1767225600
SECRET=whsec_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
{ printf '%s.' "$T"; cat delivery.json; } \
| openssl dgst -sha256 -hmac "$SECRET" -r | cut -d' ' -f1
# Compare the printed hex with each v1= value in the header (either may match
# during a secret rotation), and reject the delivery if |now - T| > 300 s.X-Capay-Signature: t=1767225600,v1=6f8b4c2d9e0a1b3c5d7e9f0a2b4c6d8e0f1a3b5c7d9e1f0a2b4c6d8e0f1a3b5c
X-Capay-Event-Id: evt_2n4Kq8Zr41Xa
X-Capay-Event-Type: collection.completedYónnee bu antuwul dañu koy jéemaat ci tabax bu sax: 1m, 5m, 30m, 2h, 6h, 12h, 24h, 24h. Benn endpoint bu antuwul 8 yoon topp ci topp dañu koy fey te wax la ko, kon endpoint bu dee du lekk ay xew ci kumpa.
Ñaari kumpa u xaatim mën nañu doxal ci benn jamono, kon mën nga leen soppi te réerul benn xew. Bàyyi lu ne lu génn palanteeru 300 saa te denc id u xew bi ngir bu delloo bi am jafe jafe.
Yeneen jumtukaay yi
Wone yu masin mën a jàng, mbooloo mu nga mën a dugal, ak jumtukaay yu leen di jàng.
Xoolal plataform bi
Tàmbalil jot payement ci Afrig gépp tey
Ubbil ab kont bu amul njëg, defaral ci sandbox bi te tàmbali ci production bu ñu verifiyee.
Wax nu say koridoor ak say volim ci waxtu wu la neex.