API reference
Every endpoint at a glance.
Gateway
Gateway endpoints at the root of the host. Authenticate with a bearer token, except for the token request itself.
| Method | Path | Purpose |
|---|---|---|
| GET | /oauth/v1/generate | Exchange consumer key and secret for a bearer token (HTTP Basic). |
| POST | /mpesa/stkpush/v1/processrequest | Send an STK Push. |
| POST | /mpesa/stkpushquery/v1/query | Query an STK Push by CheckoutRequestID. |
Dashboard
Endpoints under /v1 for the dashboard, authenticated with a dashboard login token. Environment-scoped reads require ?environment=sandbox or ?environment=live.
| Method | Path | Purpose |
|---|---|---|
| GET | /v1/credentials | List your credentials. |
| POST | /v1/credentials | Create a credential. The secret is shown once. |
| PATCH | /v1/credentials/{id} | Rename a credential. |
| POST | /v1/credentials/{id}/rotate | Issue a new secret, with an optional grace period for the old one. The secret is shown once. |
| POST | /v1/credentials/{id}/revoke | Revoke a credential permanently. |
| GET | /v1/overview/trend | Collection totals and daily series for the environment (days=1, 7, 30 or 90). |
| GET | /v1/transactions | List transactions. |
| GET | /v1/transactions/{checkoutRequestID} | Transaction detail. |
| GET | /v1/callbacks/dead-lettered | List dead-lettered callbacks. |
| POST | /v1/callbacks/{checkoutRequestID}/replay | Replay a callback. |
| GET | /v1/destinations | List destinations. |
| POST | /v1/destinations | Register a destination. |
| PATCH | /v1/destinations/{id} | Edit a destination. Changing the number sends it back for verification. |
| POST | /v1/destinations/{id}/test | Send a live KES 1 test payment to a destination. |
| DELETE | /v1/destinations/{id} | Remove a destination. |
| GET | /v1/banks | Bank directory. |
| GET | /v1/billing/plans | Public plans and prices. |
| GET | /v1/billing | Your plan, current period and usage. |
| GET | /v1/billing/invoices | List invoices. |
| POST | /v1/billing/invoices/{id}/pay | Pay an invoice by M-Pesa. |