Skip to main content
The Moflay API gives your backend direct access to M-Pesa payment, customer, and transaction workflows over HTTPS.

Base URL

Authentication

Send your API key in the Authorization header:
Use a sandbox key for sandbox data and a production key for live data. The API key determines the business, environment, and permissions for the request.

Core API areas

Payment status flow

  1. Call POST /v1/express.
  2. Store the returned paymentId and transactionId.
  3. Use GET /v1/payments/{id} for status checks (this reads Moflay’s stored state; see Payment statuses & outcomes).
  4. Use Moflay webhooks for production-grade asynchronous status updates.

Amounts

Send payment amounts as integer minor currency units. For example, amount: 1000 means KES 10.00.

Supporting behavior

  • Cursor-based pagination for list endpoints
  • Environment-specific API keys
  • Permission-based access control
  • Standardized JSON error responses
  • Rate limit headers on public API responses