Skip to content

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 API
const 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#”
  1. You create an orange_bf charge. It is immediately in send_otp status.
  2. The customer dials *144*4*6*AMOUNT# on their phone, with the exact charge amount (*144*4*6*1000# for 1,000 XOF).
  3. They follow Orange’s instructions and receive an OTP code by SMS.
  4. 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.

  1. send_otpCustomer dials *144*4*6*amount#
  2. success
    failed
Orange Money charge lifecycle
Fenêtre de terminal
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"}}'
{
"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.

Fenêtre de terminal
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.

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.

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.