Direct Charge Mobile Money Flows
When using the Direct Charge API for mobile money payments, there are three primary flow types that can occur based on the provider and region. Understanding these flows is crucial for implementing a seamless payment experience for your customers.1. Standard Flow (USSD Prompt)
The standard flow is where the customer receives a USSD prompt on their mobile device to enter their PIN to authorize the payment.How It Works:
- You initiate a direct charge request to our API
- The mobile network operator sends a USSD prompt to the customer’s device
- The customer enters their PIN on their mobile device
- The transaction is processed without any further action required from the merchant
Identifying the Flow:
In the API response, you’ll receivedata.action
as processing
, indicating that the customer needs to complete the action on their device.
Sample Response:
Common Providers:
- Safaricom (M-Pesa) in Kenya
- MTN MoMo in various countries
- Most providers that support USSD authentication
2. Redirection Flow
This flow requires redirecting the customer to a payment page hosted by the provider where they can complete their payment.How It Works:
- You initiate a direct charge request to our API
- We return a URL that you must redirect the customer to
- The customer completes the payment on the provider’s page
- The customer is redirected back to your application (if you provided a redirect URL)
Identifying the Flow:
In the API response, you’ll receivedata.action
as redirect
, along with a URL in the data.data.link
field.
Sample Response:
Implementation Requirements:
- You must redirect the customer to the URL provided in
data.data.link
- For web applications, this can be done using standard redirect methods
- For mobile applications, you may need to open the URL in an in-app browser or external browser
Common Providers:
- Wave in various countries
- Orange in several countries
3. Pre-OTP Flow
This flow requires the customer to generate a one-time password (OTP) on their device before the payment can be initiated.How It Works:
- The customer dials a USSD code on their device to generate an OTP
- The customer provides you with this OTP
- You include this OTP as
customerInput.customerCode
in your direct charge request - The transaction is processed without further customer action
USSD Codes by Provider/Country:
- Orange Ivory Coast:
#144*82#
- Orange Senegal:
#144#391#
- Orange Burkina Faso:
*144*4*6*Amount*PIN#
- Orange Mali:
#144#37#
Sample Request:
Sample Response:
Implementation Requirements:
- Instruct your customers to generate the OTP using the appropriate USSD code for their provider
- Collect the OTP from the customer
- Include the OTP in your direct charge request as
customerInput.customerCode
Common Providers:
- Orange in various countries (Senegal, Ivory Coast, Burkina Faso, Mali)