Orange Money Burkina Faso payment API
Orange Money is Orange Burkina’s mobile wallet. The customer generates an OTP by dialing a USSD code, receives it by SMS and enters it in your app to validate the payment.
provider code |
orange_bf |
| Country | Burkina Faso (XOF) |
| Number format | 8 digits, no +226 |
| Confirmation | OTP generated by the customer (send_otp) |
| Hosted page | Yes, if Orange Money is enabled on your account |
| Test mode | Yes |
Valid Orange Money numbers in Burkina Faso
Section titled “Valid Orange Money numbers in Burkina Faso”The number has 8 digits, in local format, with no country code or spaces. The second digit must be 4, 5, 6 or 7, as in 64XXXXXX, 75XXXXXX, 76XXXXXX or 07XXXXXX.
A number whose second digit is 0, 1, 2 or 3 is a Moov number, and the API rejects it with 400 INVALID_DATA and the message Invalid phone number for Orange BF.
// Clean then check the number before calling the APIconst phone = input.replace(/\D/g, '').replace(/^226/, '');const isOrange = /^\d[4-7]\d{6}$/.test(phone);Generate the OTP with the USSD code 1444*6#
Section titled “Generate the OTP with the USSD code 1444*6#”- You create an
orange_bfcharge. It is immediately insend_otpstatus. - The customer dials
*144*4*6*AMOUNT#on their phone, with the exact charge amount (*144*4*6*1000#for 1,000 XOF). - They follow Orange’s instructions and receive an OTP code by SMS.
- They enter the code in your app, and you send it to
POST /v1/payment/charges/submit.
The response’s display_text field already contains the right instruction (in French), amount included:
"display_text": "Composez *144*4*6*1000# pour obtenir un code OTP, puis entrez-le sur notre plateforme pour finaliser la transaction."The customer can generate the OTP before or after the charge is created, because only the moment you submit it matters. The OTP is valid for a limited time set by Orange. If it has expired, you get OTP_EXPIRED.
Accept Orange Money payments
Section titled “Accept Orange Money payments”send_otpCustomer dials *144*4*6*amount#successfailed
1. Create the charge
Section titled “1. Create the charge”curl https://api.senfenico.com/v1/payment/charges/ \ -H "X-API-KEY: $SENFENICO_KEY" \ -H "Content-Type: application/json" \ -d '{"amount": 1000, "ext_id": "ORD-42", "payment_method_details": {"provider": "orange_bf", "phone": "76000000"}}'<?php$res = $http->post('charges/', ['json' => [ 'amount' => 1000, 'ext_id' => 'ORD-42', 'payment_method_details' => [ 'provider' => 'orange_bf', 'phone' => '76000000', ],]]);res = requests.post(f"{API}/charges/", headers=HEADERS, json={ "amount": 1000, "ext_id": "ORD-42", "payment_method_details": { "provider": "orange_bf", "phone": "76000000", },}, timeout=60)const res = await fetch(`${API}/charges/`, { method: 'POST', headers, body: JSON.stringify({ amount: 1000, ext_id: 'ORD-42', payment_method_details: { provider: 'orange_bf', phone: '76000000', }, }),});{ "status": true, "message": "Charge attempted", "data": { "reference": "CH261126-101431-ORANGE_BF-1a2b3c4d5e", "status": "send_otp", "display_text": "Composez *144*4*6*1000# pour obtenir un code OTP, puis entrez-le sur notre plateforme pour finaliser la transaction.", "live_mode": false }}Creating an Orange charge does not contact Orange yet. It therefore always succeeds if the request is valid, and the payment is only accepted or rejected when you submit the OTP.
2. Submit the OTP
Section titled “2. Submit the OTP”curl https://api.senfenico.com/v1/payment/charges/submit \ -H "X-API-KEY: $SENFENICO_KEY" \ -H "Content-Type: application/json" \ -d '{"charge_reference": "CH261126-101431-ORANGE_BF-1a2b3c4d5e", "otp": "123456"}'Full code in all four languages, and the detailed response, are on the Direct charges page.
Test Orange Money
Section titled “Test Orange Money”With an sk_test_ key, create the charge with one of these numbers and its amount, then submit the OTP 123456. The USSD code is not needed in test mode.
Common Orange Money errors
Section titled “Common Orange Money errors”error_code |
When | What to do |
|---|---|---|
INVALID_DATA (HTTP 400) |
Not an Orange number or not 8 digits, or amount out of range. | Have the number corrected. |
OTP_INVALID |
Wrong or already used OTP. | Create a new charge; the customer dials *144*4*6*amount# again. |
OTP_EXPIRED |
OTP too old. | Create a new charge with a new OTP. |
INSUFFICIENT_FUNDS |
Orange Money balance too low. | Tell the customer. |
DAILY_TRANSACTION_LIMIT_REACHED |
Customer’s daily limit reached at Orange. | Tell the customer. |
MONTHLY_TRANSACTION_LIMIT_REACHED |
Customer’s monthly limit reached at Orange. | Tell the customer. |
EXTERNAL_API_ERROR |
Orange returned a technical error. | Try again later. |
UNKNOWN_ERROR |
Unrecognized Orange response. | Email support with the reference. |
These errors come with HTTP 200 and status: false, except INVALID_DATA. The messages to show the customer are in Error codes.