HomeDevelopersAboutBlogContact
Sign inGet startedDashboardSign out
PesaLock Rails · Payment API

One API for mobile money payments.

Accept payments from every Tanzanian network through a single REST endpoint. Webhooks, idempotency, and provider failover, built in.

POST /api/v1/payments/collect
POST /api/v1/payments/collect
X-Rails-Key: rls_live_••••••••••••
Content-Type: application/json

{
  "order_id":    "ORD-001",
  "amount":      5000,
  "buyer_phone": "2557••••••••",
  "fee_payer":   "MERCHANT"
}

→ 201 Created
{
  "rails_ref":  "rls_f47ac10b-58cc-4372",
  "status":     "PENDING",
  "expires_at": "2026-06-01T18:00:00Z"
}
Why build on Rails

Everything you need to move money

The same backbone our own products run on, production-grade from your first call.

Unified routing

One call. The correct network is auto-detected from the phone number.

Webhook delivery

Signed HMAC, retry-safe, with a full delivery audit log.

Idempotency

Safe retries via order_id deduplication, never double-charge.

Provider-agnostic

Swap providers underneath with zero changes to your product.

Full ledger

Every transaction logged across all of your products.

Sandbox

Test against every network before you ever go live.

How it routes

From your app to settled, in one hop

Your product makes a single call. Rails handles detection, routing, retries, and the signed callback.

Your app
/collect
PesaLock Rails
M-Pesa
Airtel
Tigo Pesa
Signed HMAC webhook on completion
Live on Rails

Products already running on us

Each product gets its own API key and webhook URL. Here's what's on Rails today.

Product code Name Status
MAOKOTO Maokoto Live
PESALOCK_ESCROW PesaLock Escrow Live
PESALOCK_AUTO PesaLock Auto Live
KITAB Kitab Coming soon

Start building today

Create an account, grab a sandbox key, and make your first call in minutes.