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.

MethodPathPurpose
GET/oauth/v1/generateExchange consumer key and secret for a bearer token (HTTP Basic).
POST/mpesa/stkpush/v1/processrequestSend an STK Push.
POST/mpesa/stkpushquery/v1/queryQuery 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.

MethodPathPurpose
GET/v1/credentialsList your credentials.
POST/v1/credentialsCreate a credential. The secret is shown once.
PATCH/v1/credentials/{id}Rename a credential.
POST/v1/credentials/{id}/rotateIssue a new secret, with an optional grace period for the old one. The secret is shown once.
POST/v1/credentials/{id}/revokeRevoke a credential permanently.
GET/v1/overview/trendCollection totals and daily series for the environment (days=1, 7, 30 or 90).
GET/v1/transactionsList transactions.
GET/v1/transactions/{checkoutRequestID}Transaction detail.
GET/v1/callbacks/dead-letteredList dead-lettered callbacks.
POST/v1/callbacks/{checkoutRequestID}/replayReplay a callback.
GET/v1/destinationsList destinations.
POST/v1/destinationsRegister a destination.
PATCH/v1/destinations/{id}Edit a destination. Changing the number sends it back for verification.
POST/v1/destinations/{id}/testSend a live KES 1 test payment to a destination.
DELETE/v1/destinations/{id}Remove a destination.
GET/v1/banksBank directory.
GET/v1/billing/plansPublic plans and prices.
GET/v1/billingYour plan, current period and usage.
GET/v1/billing/invoicesList invoices.
POST/v1/billing/invoices/{id}/payPay an invoice by M-Pesa.