Transaction Error Codes

Our API normalizes upstream errors to provide consistent, human-readable messages. Below is a reference of the specific error strings returned in the API response and how to handle them.

Timeout Errors

Error MessageDescription
The user took too long to respond.The STK Push prompt was sent but the user did not respond in time.
Request timed out.The upstream endpoint did not respond within the allowed window.
No response from user.The payment prompt was delivered but the user never acted on it.
Transaction time out.A general timeout — the transaction or payment charge expired before completion.

User Action Errors

Error MessageDescription
The User could not be reached.The mobile device was unreachable (off, out of service, etc.).
The user cancelled the request.The user actively declined or cancelled the payment prompt.
The user did not authorize the transaction.The user saw the prompt but chose not to authorize it.
The User cannot be reached by STK PushThe target number cannot receive STK Push requests.
The number is invalid.The phone number provided is not a valid format.

Insufficient Funds / Balance Errors

Error MessageDescriptionApplies To
The balance is insufficient for the transaction.The user's mobile money or wallet balance is too low.Deposits
Low balance or payee limit reached or not allowedThe sender's balance is too low or a payee-side limit has been hit.Deposits

Transaction Status Errors

Error MessageDescription
The user did not complete the transaction.The operation finished on the provider side but no transaction was recorded.
STK Push Validation FailedThe STK Push request failed provider-side validation.
Duplicate transaction detected. Please wait 2 minutes before retryingAn identical transaction was recently submitted. Wait before retrying.
The transaction was not completed.The transaction started but was not finalized.
Transfer to the specified shortcode is declined.The target shortcode rejected the transfer.
Invalid transaction details.One or more transaction parameters were invalid.

System / Internal Errors

Error MessageDescription
Connection was lost.The connection to the upstream provider was unexpectedly closed.
Transaction failed due to internal processing issues. Please try again.An internal processing error on the provider side. Retry recommended.
Transaction could not be completed in time. Please try again and approve within 5 minutes.The provider could not process the transaction. Retry and approve promptly.
Transaction failed due to system errorA generic system-level failure on the provider side.
Payment currently unavailable. Please try again later.The payment method or provider is temporarily down.
Mpesa system is busy.The M-Pesa platform is experiencing high load. Retry after a short delay.

Account / Recipient Errors

Error MessageDescription
The initiator information is invalid.The API initiator credentials or configuration are incorrect.
The customer does not exist.The target customer account was not found on the provider side.
The recipient's number is invalid or not registered for Mobile Money.The payee number does not exist or is not enrolled in Mobile Money.
The sender's number is invalid or not registered for Mobile Money.The payer number does not exist or is not enrolled in Mobile Money.
Invalid Phone NumberThe phone number failed format validation.
Account does not exist.The specified account could not be found.
Invalid mobile number.The mobile number provided is not valid.

Default Error

If the error does not match any known pattern, the API will return:

Unknown error occurred.