kamalogudah / ganji

Kenyan Payments
MIT License
0 stars 1 forks source link

Lipa na M-Pesa Online Payment #8

Open kamalogudah opened 5 years ago

kamalogudah commented 5 years ago

Lipa na M-Pesa Online Payment API is used to initiate a M-Pesa transaction on behalf of a customer using STK Push. This is the same technique mySafaricom App uses whenever the app is used to make payments.

Lipa na M-Pesa Online Payment - Resource URL POST https://sandbox.safaricom.co.ke/mpesa/stkpush/v1/processrequest

Lipa na M-Pesa Online Payment - Request Parameters

Parameter Description
BusinessShortCode The organization shortcode used to receive the transaction.
Password The password for encrypting the request. This is generated by base64 encoding BusinessShortcode, Passkey and Timestamp.
Timestamp The timestamp of the transaction in the format yyyymmddhhiiss.
TransactionType The transaction type to be used for this request. Only CustomerPayBillOnline is supported.
Amount The amount to be transacted.
PartyA The MSISDN sending the funds.
PartyB The organization shortcode receiving the funds
PhoneNumber The MSISDN sending the funds.
CallBackURL The url to where responses from M-Pesa will be sent to.
AccountReference Used with M-Pesa PayBills.
TransactionDesc A description of the transaction.

Lipa na M-Pesa Online Payment - Response Parameters

Parameter Description
MerchantRequestID Merchant Request ID
CheckoutRequestID Check out Request ID
ResponseCode Response Code
ResultDesc Result Desc
ResponseDescription Response Description message
ResultCode Result Code

Checkout the documentation -----HERE-----