Base URL
Authentication
Every endpoint except Generate bearer token needs:api-key header and your public key in the body. Tokens last one hour.
Requests and responses
- Send JSON with
Content-Type: application/json. - Responses are JSON with a
successboolean. Most put their payload indata. - Currency is
KESand country isKE. - Amounts are in shillings:
1500is KES 1,500. - Phone numbers use
254XXXXXXXXX, without the+. The one exception is Get phone number operator, which takes+254XXXXXXXXX.
Idempotency
Checkout sessions, charges, payouts and refunds require anexternalReference that you generate, unique to each transaction. Sending the same value again returns 409 DUPLICATE_EXTERNAL_REFERENCE instead of creating a second transaction, so it’s safe to resend a request that timed out. You can also use externalReference in place of transactionId with Get transaction.
Asynchronous results
A200 from a charge or payout means the request was accepted. The result arrives later by webhook. Only successful means money moved.
Errors
Failed requests return a4xx or 5xx status with success: false, a human-readable message and, for most errors, an errorCode to branch on. See API errors.

