Documentation Index
Fetch the complete documentation index at: https://moflay.com/docs/llms.txt
Use this file to discover all available pages before exploring further.

What is Moflay?
Moflay is a developer infrastructure layer for M-Pesa payments. Daraja gives access to M-Pesa. Moflay gives developers the production layer around that access: a clean API, SDK, signed webhooks, transaction records, logs, dashboard visibility, and managed credentials for your own till or paybill.Built around Daraja
Moflay uses Daraja as the M-Pesa access layer and adds the developer
workflow your app needs around it.
Made for production apps
Move beyond a working STK Push demo with webhooks, payment states,
reconciliation records, environments, and dashboard tools.
Problems Moflay solves
Daraja setup takes time
Daraja setup takes time
The problem: A direct M-Pesa integration usually needs Daraja
credentials, token handling, environment setup, callbacks, and payment
state management before your app can safely accept payments.Moflay’s solution: Save your credentials in Moflay, create an API key,
and call one payment API while Moflay handles the Daraja workflow around
the request.
Callbacks are hard to operate
Callbacks are hard to operate
The problem: Safaricom callbacks are part of the payment flow, but your
product still needs clean events, retries, signature verification, and
idempotent handling.Moflay’s solution: Moflay receives the Safaricom callback, updates the
payment state, and sends signed webhooks such as
payment.completed and
payment.failed to your backend.Payment state needs to be reliable
Payment state needs to be reliable
The problem: Your app needs to know whether a payment is pending,
completed, failed, or still waiting for a final result.Moflay’s solution: Moflay stores payment and transaction records that
are easier to reconcile from the dashboard, API, or webhook events.
Debugging payments should be simpler
Debugging payments should be simpler
The problem: When a payment fails, developers need enough context to
understand what happened without digging through scattered logs.Moflay’s solution: Use the dashboard to inspect customers,
transactions, API keys, credentials, environments, and webhook behavior in
one place.
Core features
M-Pesa Express payments
STK Push API
Create M-Pesa Express payment requests from your backend.
Node.js SDK
Use
@moflay/sdk for a faster TypeScript and Node.js integration.Raw HTTP
Call the REST API directly from any language or backend framework.
Environments and credentials
Sandbox
Test payments safely before you move to production.
Production
Use live Daraja credentials when you are ready to process real payments.
Managed credentials
Store Daraja credentials by business and environment.
Webhooks and records
Signed webhooks
Receive payment and customer events in your backend.
Transactions
Read transaction records for reporting and reconciliation.
Customers
Create, list, update, and delete customer records.
How Moflay works
Your app creates a payment
Your backend calls Moflay with the phone number, amount, description, and
optional customer details.
Moflay talks to Daraja
Moflay uses the Daraja credentials saved for the selected environment to send
the M-Pesa Express request.
The customer approves the prompt
The customer confirms the payment from the M-Pesa prompt on their phone.
Moflay records the result
Safaricom sends the callback to Moflay. Moflay updates the payment and
transaction state.
Integration options
- SDK
- HTTP API
- Dashboard
Use the Node.js SDK when you want the fastest path in a TypeScript or
JavaScript backend.Start with Make your first payment.
Quick start
Create your account
Create a Moflay account and organization from the
Moflay dashboard.
Create an API key
Generate a sandbox API key with the permissions your backend needs.Learn more in Create an API key.
Send a sandbox payment
Use the SDK or raw HTTP API to send your first M-Pesa Express payment.Start with Make your first payment.
Set up webhooks
Configure a webhook endpoint so your backend can receive signed payment
events.Read the Webhook overview.
Prepare for production
Add and verify your live Daraja credentials, then complete the go-live
checklist.Use the Go-live checklist.
Why choose Moflay?
- Developers
- Startups
- Teams
Cleaner integration
Use one API or SDK instead of building every Daraja workflow directly
inside your app.
Less payment plumbing
Let Moflay handle credentials, callbacks, webhook delivery, and
transaction records around the payment flow.
Pricing model
Pay per successful transaction
Moflay charges when payments succeed, so costs follow usage.
No setup or monthly platform fee
Start building without a fixed monthly software fee.
Contact Moflay if you need custom pricing for high-volume or enterprise use
cases.
Ready to start?
Create account
Create your Moflay account and organization.
Make your first payment
Send a sandbox M-Pesa Express payment with the SDK.
Read how Moflay works
Understand how Moflay fits between your app, Daraja, and M-Pesa.
Explore the API
Review authentication, endpoints, errors, rate limits, and pagination.