POST
/
pay
/
mpesa
curl --request POST \
  --url https://api.mpesaflow.com/v1/pay/mpesa \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "phoneNumber": "<string>",
  "amount": "<string>",
  "transactionDesc": "<string>",
  "accountReference": "<string>"
}'
{
  "success": true,
  "data": {
    "CheckoutRequestID": "<string>",
    "CustomerMessage": "<string>",
    "MerchantRequestID": "<string>",
    "ResponseCode": "<string>",
    "ResponseDescription": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Authorization
string
required
Example:

"Bearer SECRET"

Body

application/json

The payment details

The body is of type object.

Response

200
application/json

Payment initiated

The response is of type object.