M-PESA Payments
Initiate M-PESA Payment
Postman Collection
For more header and response codes descriptions expand the link below.
Initiate M-PESA Payment.
POST
https://api.chpter.co/v1/initiate/mpesa-payment
Send an STK push to an MPesa phone number.
Headers
Api-Key*
String
Your chpter Public Key
Content-Type
String
application/json
Request Body
customer_details*
Object
Customer Details
full_name*
String
Customer Name
products*
List / Array
Product Details
location*
String
Customer Location
email*
String
Customer Email
phone_number*
String
Customer PhoneNumber
unit_price*
Float
Product Price
quantity*
Integer
Product Quantity
product_name*
String
Product Name
digital_link
String
Product Digital Link
amount*
Object
Object with Amount Details
discount_fee*
Float
Discount Fee
delivery_fee*
Float
Delivery Fee
currency*
String
Currency code (KES)
total*
Float
Total Amount to be paid
callback_details*
Object
Callback Object
transaction_reference*
String
Unique reference
callback_url*
String
Your callback URL
notify_customer
Boolean
Defaults to true. (The customer will receive a payment receipt from chpter.)
Good to know: This API uses webhooks to notify you of the payment status through the callback url.
Quick view
Sample body and the respective response code.
Webhook / Callback Responses
Good to know: Use the Success key value on the response to check if the payment is successful or not.
Here are sample webhook/callback responses.
Last updated