Request Money
Initiates a direct debit from the mobile money wallet e.g M-pesa, of your customer into your account. The customer gets an alert on their phone asking them to enter their PIN to confirm payment.
Once completed, it sends an Instant Transaction Notification or webhook event to your callback URL for you to process the transaction.
Endpoints
https://developer.lipisha.com/index.php/v2/api/request_money TEST
https://api.lipisha.com/v2/request_money LIVE
Request POST application/x-www-form-urlencoded
Parameter |
Description |
Example |
api_key |
Your Lipisha API key. |
3aa67677e8bf1d4c8fe886a38c03a860 |
api_signature |
Your Lipisha API signature. |
SYetmwsNnb5bwaZRyeQKhZNNkCoEx+5x= |
account_number |
Account number of the transaction account |
00100 |
mobile_number |
Mobile number of the customer |
254712345678 |
method |
Method to carry out the transaction. Options are:
- Paybill (M-Pesa)
- Paybill (M-Pesa - Merchant All)
|
Paybill (M-Pesa) |
amount |
Amount requested from the customer |
1000 |
currency |
Currency of the transaction |
KES |
reference |
Your identifier for the transaction |
INV000001 |
Example Request
curl "https://developer.lipisha.com/index.php/v2/api/request_money" \
-X POST \
--data-urlencode "api_key=3aa67677e86a38c03a860" \
--data-urlencode "api_signature=SYetmwsNnb5bwaZRyeQKhZNNkCoEx+5x=" \
--data-urlencode "account_number=00100" \
--data-urlencode "mobile_number=254712345678" \
--data-urlencode "method=Paybill (M-Pesa)" \
--data-urlencode "amount=1000" \
--data-urlencode "currency=KES" \
--data-urlencode "reference=INV000001"
Response application/json
Parameter |
Description |
Example |
Status |
status |
Status of the API call |
SUCCESS |
status_code |
Status code of the API call |
0000 |
status_description |
Description of the API call |
Balance Found |
Content |
transaction |
Lipisha identifier for the transaction |
ABC12345QR |
account_number |
Account number of the transaction account |
00100 |
mobile_number |
Mobile number of the customer |
254712345678 |
method |
Method to carry out the transaction. Options are:
- Paybill (M-Pesa)
- Paybill (M-Pesa - Merchant All)
|
Paybill (M-Pesa) |
amount |
Amount requested from customer |
1000 |
currency |
Currency of the transaction |
KES |
reference |
Your identifier for the transaction |
INV000001 |
Example Response
{
"status": {
"status_code": "0000",
"status_description": "Payment Requested",
"status": "SUCCESS"
},
"content": {
"transaction": "ABC12345QR",
"method": "Paybill (M-Pesa)",
"account_number": "00100",
"mobile_number": "254712345678",
"amount": "1000",
"currency": "KES",
"reference": "INV000001"
}
}