Build on the
payments platform
Accept M-Pesa, cards and PayPal, hold funds in escrow, create wallets and split payouts with one REST API and signed webhooks.

What you can build
Checkout API
Hosted or embedded checkout with M-Pesa STK push, cards, PayPal and Airtel Money.
Learn moreWallets and ledgers
Create wallets, move money between them and read balances and statements.
Learn moreEscrow API
Open, fund, release and dispute escrow trades programmatically.
Learn morePayouts and splits
Pay hundreds of people at once or split every payment between parties.
Learn moreWallet-as-a-Service
Give each of your users a wallet and a branded money experience.
Learn moreWebhooks
Get signed events for payments, payouts, escrow and disputes in real time.
Learn moreTake a payment in three calls
Illustrative requests. Endpoint names and fields are shown for design; see the docs for the current reference.
curl https://api.paysasa.com/v1/checkout/sessions \
-H "Authorization: Bearer $PAYSASA_SECRET_KEY" \
-d amount=250000 \
-d currency=KES \
-d "methods[]"=mpesa -d "methods[]"=card \
-d reference=ORDER-1042 \
-d callback_url=https://shop.example/hooks/paysasa{
"event": "payment.succeeded",
"id": "evt_8f21c",
"data": {
"reference": "ORDER-1042",
"amount": 250000,
"currency": "KES",
"method": "mpesa",
"receipt": "SJK3L9XYZ1"
}
}Webhooks you can trust
Every event is signed so you can verify it came from Paysasa. Handle retries safely with idempotency keys and event IDs.
- Signed with HMAC-SHA256 and a timestamp
- Automatic retries with exponential back-off
- Events for payments, payouts, escrow, wallets and disputes
- Replay events from the dashboard
// Verify the webhook signature (Node.js)
const sig = req.headers['paysasa-signature'];
const ok = crypto.timingSafeEqual(
Buffer.from(sig),
Buffer.from(hmac(secret, rawBody)));
if (!ok) return res.sendStatus(400);Go live in four steps
Create an account
Sign up and complete business verification.
Get test keys
Use the sandbox and test numbers to simulate payments.
Build and test
Integrate checkout and webhooks and run through failures.
Switch to live keys
Go live once verified, and monitor events in the dashboard.
Built for production
Secure by default
TLS, scoped API keys, IP allow-lists and signed callbacks.
Idempotent requests
Send an idempotency key so retries never create duplicate payments.
Clear errors
Consistent error codes and messages that tell you what to fix.
Frequently asked questions
Create an account, then open Developers in the dashboard to create test and live keys. Live keys need a verified business.
Yes. The sandbox mirrors production with test numbers and simulated M-Pesa and card outcomes.
The API is plain REST and JSON so it works from any language. Official SDKs are planned. [Confirm SDK list.]
The reference is at our docs site. If you are stuck, talk to our developer support.
Yes. Use Wallet-as-a-Service for seller wallets and split payouts, with escrow for high-value orders. See Platforms and marketplaces.