Skip to main content
Cloudpay is payments infrastructure for businesses in Africa. It covers three things:
  • Collect. Take payments by M-Pesa, Airtel Money, T-Kash and card.
  • Pay out. Send money to phones, banks, tills and paybills.
  • Settle. Move your balance to your own account.
Every shilling goes through a double-entry ledger, and the database itself keeps that ledger balanced.

Quickstart

Collect your first payment in five minutes with a test key.

Environments

Test and live keys, what’s real in Development, and how to go live.

Test your integration

Twelve scenarios to run, and the go-live checklist.

Rails and networks

M-Pesa, Airtel Money, T-Kash and cards: which provider does what.

Collect payments

M-Pesa prompts, other networks and card checkout.

Pay out

Phones, banks, tills and paybills, one at a time or in bulk.

Errors

Every error code, what causes it and what to do.

API reference

Every endpoint, with request and response schemas.

How an integration fits together

1

Get keys

Cloudpay issues your business a test key (sk_test_…) and, after verification, a live key (sk_live_…). An owner can also create keys in the dashboard under API keys.
2

Create a payment

POST a collection or payout with an idempotency_key. The response comes back at once with status: initiated or pending.
3

Wait for the rail

Payments are asynchronous: the customer has to approve the prompt on their phone, or the bank has to confirm. Poll the payment until it reaches a final status. See Payment lifecycle.
4

Handle errors by code

Every failure carries a stable errors.code. Branch on that code, never on the message. See Errors.

Base URL

Every path in these docs goes after this base, for example https://api.cloudpay.africa/cloudpay/v1/merchants/{id}/collections. Keep it in one setting (CLOUDPAY_API) rather than in each call. Test and live share this one URL. The key decides the environment. Every response carries X-CloudPay-Environment: test or live, so you can always check which environment answered.