For Developers & Businesses

Escrow API for Kenyan businesses

Add M-Pesa escrow to your platform with one REST API — we handle the STK push, fund holding, notifications and release. Your buyers and sellers never touch Daraja.

Instant setup No account required SMS & WhatsApp updates
The Product

One API call. A fully managed escrow transaction.

You POST the deal details — we collect the money, hold it safely, notify both parties, and release or refund on your terms.

One REST endpoint

Create a transaction with a single POST — item, amount, phones, deadline. We return a buyer payment link and a seller tracking link instantly.

M-Pesa built in

Live transactions fire a real STK push to the buyer's phone. No Daraja integration, no shortcode paperwork, no callback plumbing on your side.

Signed webhooks

Every status change — paid, released, disputed, refunded, expired — POSTs a signed JSON event to your endpoint. Verify with HMAC-SHA256.

True sandbox mode

Test keys create fully simulated transactions — no money, SMS or WhatsApp moves. Simulate payments and drive the whole lifecycle from the dashboard.

Idempotent by design

Send an Idempotency-Key and retries can never create duplicate orders — safe for unreliable networks and queue consumers.

Disputes handled

Buyers can dispute from the escrow page; your team reviews and refunds or releases. The hard part of trust is already built.

Built for Kenyan platforms

Marketplaces, classifieds, freelance platforms, e-commerce stores, ticketing and booking services — anywhere two strangers need to exchange money for goods or services, escrow is the missing trust layer. Until now, building it meant integrating Daraja yourself, managing funds, and handling disputes. The Kenya Escrow Business API wraps all of that in one call.

How an API transaction flows

  • POST /transactions — send seller amount, both M-Pesa numbers, item name and duration.
  • Buyer pays — an M-Pesa STK push lands on their phone automatically (live keys), or send them the buyer_link.
  • Funds held — we notify the seller by SMS & WhatsApp with their tracking link.
  • Delivery & release — the buyer confirms on the escrow page; the seller is paid via B2C. Disputes route to admin review for refund or release.
  • Webhooks — every transition hits your endpoint, signed with your secret.

Free sandbox, real confidence

Register and get a ke_test_ key instantly — no approval needed. Test transactions simulate the full lifecycle, fire real signed webhooks, and never touch money or SMS. When you're ready, submit your business details for compliance review and receive a ke_live_ key.

Fees

API transactions use the same transparent fee schedule as the public site — a small escrow service fee paid by the buyer, decreasing as amounts grow. Sellers receive up to KSh 240,000 per transaction. See the pricing page for the full breakdown.

Ship escrow this week

Register, get a test key instantly, and create your first sandbox transaction in minutes.

Get API Keys