Common MPESA Daraja API error codes, explanation and mitigation
M-PESA being the predominant payment option in Kenya, tens of thousands of businesses have to integrate their systems with the mobile money service via Daraja API. Here are the common Daraja API error codes such as 1037,1032, 2001,1025,17 and others, their interpretations, and mitigation/solutions.
Error Code: 1037 (MSISDN unreachable/No response from user)
This is the most common stk push error that often occurs due to timeout, or the mpesa number being unreachable. The possible causes would be user taking too long to authorize payment(enter PIN), outdated SIM CARD, or the mpesa number being off/out of network coverage.
It is very common with eSIMs on iOS.
Mitigations
– Go to STK Menu> My Account > Update Customer Menu
– Restart phone and try again.
Error Code 1032( Request cancelled by user)
Simply means the STK/USSD prompt was deliberately or inadvertedly cancelled by the user.
Mitigation
Reinitiate the payment again.
Error Code 1(Insufficient funds)
Means the user neither has funds in mpesa account nor available fuliza overdraft limit.
Mitigation
The user should deposit funds into their MPESA account and try again.
Error code 2001( Invalid Initiator Information)
This means the user entered wrong MPESA PIN when authorizing the STK payment prompt.
Mitigation
Try again and enter the corrent MPESA PIN. The limit is three attempts.
Error Code: 1001 (Transaction in Progress)
Means that MPESA is nable to lock subscriber, that is, the user has a active USSD session processing another transaction.
Mitigation
Wait for one or two minutes and retry the payment.
Error Code: 1025/9999 (Unable to send STK prompt)
Typically occurs when there’s a temporary issue within the transaction request system, or when ‘TransactionDesc’ parameter in STK PUSH request body exceeds 182 characters including whitespaces. More importantly, it could result from attempting to send MPESA STK push to unsupported MSISDN like Airtel, JTL or Telkom numbers.
Mitigation
Make sure ‘TransactionDesc’ parameter in STK PUSH request body does not exceed 182 characters, wait for one to two minutes then try again. Make sure the MSISDN used is a valid Safaricom number registered for Mobile money.
Error Code: 17 (Party B Unable to process transaction)
This occurs when the shortcode receiving payment is temporarily unable to process the transaction.
Mitigation
Wait for 30-45 seconds and retry the payment.
