Simulate or fake a mobile payment when testing. This is only available for the sandbox environment.
Once completed, it sends an Instant Transaction Notification or webhook event to your callback URL for you to process the transaction.
https://developer.lipisha.com/index.php/v2/api/simulate_payment TEST
Parameter | Description | Example |
---|---|---|
api_key | Your Lipisha API key. | 3aa67677e8bf1d4c8fe886a38c03a860 |
api_signature | Your Lipisha API signature. | SYetmwsNnb5bwaZRyeQKhZNNkCoEx+5x= |
mobile_number | Mobile number of the customer. | 254712345678 |
payment_type |
Payment type to simulate the transaction. Options are: Kenya
|
Paybill (M-Pesa) |
business_number | Business number, paybill number or till number as would be entered by the customer. Ensure you use one of the designated business numbers (either Shared or Dedicated) e.g 961700 in this case. Options are: For Shared
Log into the sandbox and create/check for dedicated business numbers under Settings then Payments. |
961700 |
account_number | Account number as would be entered by the customer. You can also add a merchant reference e.g. INV000002, after the account number separated by a delimeter (any non alpha-numeric character e.g #, -, /, _, | etc) e.g #INV000002 therefore 00100#INV000002 or /INV000002 therefore 00100/INV000002 For Shared Ensure you have or prefix one of your designated account numbers e.g 00100 in this case when using a Shared business number. Log into the sandbox and check for account numbers under Settings then Payments. For Dedicated Simply enter the merchant reference e.g. INV000002, if required. Having the account number prefix is not mandatory for dedicated paybills. |
00100#INV000002 |
amount | Amount as would be entered by the customer. | 1000 |
curl "https://developer.lipisha.com/index.php/v2/api/simulate_payment" \
-X POST \
--data-urlencode "api_key=3aa67677e86a38c03a860" \
--data-urlencode "api_signature=SYetmwsNnb5bwaZRyeQKhZNNkCoEx+5x=" \
--data-urlencode "mobile_number=256712345678" \
--data-urlencode "payment_type=Paybill (MTN Money)" \
--data-urlencode "business_number=21234" \
--data-urlencode "account_number=INV000002" \
--data-urlencode "amount=1000"
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 | Mobile payment simulated. Ensure all provided parameters are correct. |
Content |
{
"status": {
"status_code": "0000",
"status_description": "Mobile payment simulated. Ensure all provided parameters are correct.",
"status": "SUCCESS"
},
"content": []
}