Skip to content

Direct mobile money payments (Charges API)

A charge debits a customer’s mobile money account without the customer leaving your website or app. You build the interface (number, operator, OTP field), and Senfenico passes the request on to the operator.

Use charges when you want full control of the payment experience, or when you collect in Benin, which the hosted page does not offer.

Operation Route
Create a charge POST /v1/payment/charges/
Submit the OTP POST /v1/payment/charges/submit
Retrieve a charge GET /v1/payment/charges/{reference}/
List charges GET /v1/payment/charges/

Depending on the operator, a new charge waits either for an OTP that you submit, or for the customer to approve on their phone.

  1. send_otpYou submit the OTP
    pay_offlineCustomer approves on their phone
  2. success
    failed
Charge status lifecycle
Operator provider Status at creation How the customer confirms
Orange Money orange_bf send_otp Generates an OTP by dialing *144*4*6*amount#, receives it by SMS and enters it in your app.
Moov Money moov_bf send_otp or pay_offline Enters the OTP received by SMS (default), or approves via *555*6# with confirmation_method: "ussd".
Coris Money coris_bf send_otp Enters the OTP received by SMS.
Sank Money sank_bf send_otp Enters the OTP received by SMS.
MTN Mobile Money (Benin) mtn_bj pay_offline Approves the request on their phone.
Moov Money (Benin) moov_bj pay_offline Approves the request on their phone.
POST/v1/payment/charges/
Parameter Type Description
amount integer, required Amount in XOF, whole number, from 100 to 1000000.
payment_method_details.provider string, required orange_bf, moov_bf, coris_bf, sank_bf, mtn_bj or moov_bj. The operator must be enabled on your account.
payment_method_details.phone string, required Customer number, digits only, no country code. Burkina: 8 digits. Benin: 10 digits.
payment_method_details.confirmation_method string, optional otp (default) or ussd. Only Moov Money Burkina uses it.
ext_id string, optional Your own reference (order number), max 200 characters. Neither unique nor idempotent.
currency string, optional XOF (only value, default).
payment_method string, optional mobile_money (only value, default).
  1. Create the charge from your server

    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-2026-0042",
    "payment_method_details": {
    "provider": "orange_bf",
    "phone": "76000000"
    }
    }'

    The Node.js examples use top-level await. Run them as ES modules (a .mjs file or "type": "module" in package.json), or wrap them in an async function.

    201 Created response:

    {
    "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
    }
    }

    Store reference with your order. Show display_text to the customer, because it tells them what to do. This text is always in French; translate it on your side if needed.

  2. Read data.status to know what comes next

    With send_otp, show an OTP field, then submit the OTP. With pay_offline, show display_text and wait for confirmation.

Initialization failure: HTTP 200 and status: false

Section titled “Initialization failure: HTTP 200 and status: false”

If the operator rejects the request straight away (unknown number, insufficient balance, operator unavailable), the API returns 200 OK with status: false. Always check the HTTP code and the status field.

{
"status": false,
"message": "Transaction failed. The phone number is not valid or is not associated with an account with operator. Please check the phone number and try again.",
"error_code": "INVALID_ACCOUNT"
}

In that case, ask the customer to check their number or to try another operator, then create a new charge.

POST/v1/payment/charges/submit
Parameter Type Description
charge_reference string, required The reference returned at creation.
otp string, required The code given by the customer. Spaces and non-digit characters are stripped. It must stay between 2 and 10 digits.
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"
}'

200 OK response when the payment is accepted:

{
"status": true,
"message": "charge completed successfully",
"data": {
"reference": "CH261126-101431-ORANGE_BF-1a2b3c4d5e",
"amount": 1000,
"fees": 2.99,
"currency": "XOF",
"transaction_date": "2026-11-26T10:14:31.208411+00:00",
"ip_address": "203.0.113.10",
"status": "success",
"live_mode": false,
"payment_method": "mobile_money",
"provider": "orange_bf",
"ext_id": "ORD-2026-0042",
"operator_id": "MP261126.1015.A12345",
"cancelled_at": null,
"cancellation_reason": null,
"confirmation_attempts": [
{
"ip_address": "203.0.113.10",
"attempt_date": "2026-11-26T10:15:02.114093+00:00",
"confirmation_status": "success"
}
]
}
}

This response differs from GET /charges/{reference}/ in two ways. The operator identifier is called operator_id here (operator_trans_id when reading), and fees is a number here (a string when reading). There is also no phone field.

200 OK response when the operator rejects it:

{
"status": false,
"message": "Charge operation failed. The OTP is invalid. Please try again.",
"error_code": "OTP_INVALID"
}
Operator After a rejected OTP
Orange Money (live) The charge becomes failed. Create a new charge; the customer generates a new OTP.
Moov, Coris, Sank The charge stays send_otp, and the customer can re-enter the OTP on the same charge.
All (test mode) The charge stays send_otp, and you can submit again.

When in doubt, fetch the charge. If it is failed, create a new one. Do not submit an OTP on a failed charge.

A charge that is already success no longer accepts an OTP, and the API returns 404 CHARGE_NOT_FOUND.

For Moov Money in USSD mode and for Benin, there is no OTP to submit. The customer approves on their phone, then the status becomes success.

  1. Show display_text. For Moov, it asks the customer to dial *555*6# and follow the instructions.
  2. Wait for the charge.success webhook, or poll GET /v1/payment/charges/{reference}/ about every 5 seconds.
  3. Set your own timeout (for example 10 to 15 minutes), after which you offer the customer to try again.
GET/v1/payment/charges/{reference}/
Fenêtre de terminal
curl https://api.senfenico.com/v1/payment/charges/CH261126-101431-ORANGE_BF-1a2b3c4d5e/ \
-H "X-API-KEY: $SENFENICO_KEY"
{
"status": true,
"message": "Charge attempted",
"data": {
"reference": "CH261126-101431-ORANGE_BF-1a2b3c4d5e",
"amount": 1000,
"fees": "2.990",
"currency": "XOF",
"transaction_date": "2026-11-26T10:14:31.208411Z",
"ip_address": "203.0.113.10",
"status": "success",
"live_mode": false,
"payment_method": "mobile_money",
"provider": "orange_bf",
"phone": "76000000",
"ext_id": "ORD-2026-0042",
"operator_trans_id": "MP261126.1015.A12345",
"cancelled_at": null,
"cancellation_reason": null,
"created_at": "2026-11-26T10:14:31.209027Z",
"updated_at": "2026-11-26T10:15:02.117652Z",
"confirmation_attempts": [
{
"ip_address": "203.0.113.10",
"attempt_date": "2026-11-26T10:15:02.114093Z",
"confirmation_status": "success"
}
]
}
}

The message is "Charge attempted" whatever the status, so always read data.status. An unknown reference, or one created with the other key (test or live), returns 404 and "Charge not found".

Field Type Description
reference string Unique charge identifier. Treat it as an opaque string.
status string send_otp, pay_offline, success, failed (plus pending, canceled, reserved). See Lifecycle.
amount integer Amount debited, in XOF.
fees decimal (string) Fee rate applied, as a percentage of the amount: "2.990" = 2.99%. It is not an amount in XOF.
currency string XOF.
provider string Operator code, for example orange_bf.
phone string Number debited.
ext_id string or null Your reference. null for a charge created by a checkout.
operator_trans_id string or null Transaction ID at the operator, when known. Useful for disputes.
live_mode boolean true in live mode.
transaction_date ISO 8601 date (UTC) Timestamp recorded when the charge was created (not the confirmation time).
created_at, updated_at ISO 8601 date (UTC) Creation and last update. updated_at reflects the latest status change.
ip_address string IP address that created the charge.
confirmation_attempts list Each OTP submission: ip_address, attempt_date, confirmation_status (success / failed).
cancelled_at, cancellation_reason null in practice Reserved for cancellation.
payment_method string mobile_money.
GET/v1/payment/charges/

The list returns 10 charges per page (page parameter, for example ?page=2), newest first.

Filter Example Effect
status success One of the charge statuses.
ext_id ORD-2026-0042 Exact match on your reference.
reference CH2611 Reference containing this value.
provider, phone moov_bf Exact match.
operator_trans_id MP2611… Operator identifier.
date_from, date_to 2026-11-01 Creation date, inclusive, YYYY-MM-DD.
amount_min, amount_max 500 Amount in XOF.
order_by -amount created_at, -created_at (default), amount, -amount, status, -status.
Fenêtre de terminal
curl "https://api.senfenico.com/v1/payment/charges/?ext_id=ORD-2026-0042" \
-H "X-API-KEY: $SENFENICO_KEY"
{
"status": true,
"message": "Charge list retreived",
"data": [
{ "reference": "CH261126-101431-ORANGE_BF-1a2b3c4d5e", "status": "success", "amount": 1000, "ext_id": "ORD-2026-0042", "…": "…" }
],
"pagination": {
"count": 1,
"total_pages": 1,
"current_page": 1,
"page_size": 10,
"has_next": false,
"has_previous": false
}
}

To find the charge behind a checkout, fetch the checkout and read its charge_reference.

HTTP error_code When What to do
201 none Charge created (status: true). Continue based on data.status.
200 For example INVALID_ACCOUNT, INSUFFICIENT_FUNDS, EXTERNAL_API_ERROR, INTERNAL_ERROR or UNKNOWN_ERROR Creation rejected by the operator (status: false). Offer the customer to fix the number or to try another operator.
200 For example OTP_INVALID, OTP_EXPIRED, INSUFFICIENT_FUNDS, MONTHLY_TRANSACTION_LIMIT_REACHED or DAILY_TRANSACTION_LIMIT_REACHED OTP rejected (status: false). See Retry after a refusal.
400 INVALID_DATA Invalid field, for example an amount out of range, a malformed number, an operator not enabled on your account, or an empty or malformed OTP. Details in errors. Fix the request.
403 UNAUTHORIZED_CHARGE_PROVIDER Operator not authorized for your account. In practice this is almost always caught earlier, as 400 INVALID_DATA (example below). Handle both. Email contact@senfenico.com to enable it.
403 none Missing or invalid API key. status is a string here (see Authentication). Check the X-API-KEY header.
404 CHARGE_NOT_FOUND On submit, the reference is unknown or the charge is already success. Fetch the charge to see its status.
500 INTERNAL_ERROR Unexpected error. Fetch the charge before retrying, to avoid a double debit.

Example 400 when the operator is not enabled on your account:

{
"status": false,
"message": "Invalid data provided. Please check the input and try again.",
"error_code": "INVALID_DATA",
"errors": {
"payment_method_details": {
"provider": ["You does not have permission to charge with coris_bf."]
}
}
}

403 response for an invalid key. Check the HTTP code before status (see Missing or invalid key).

{ "status": "False", "message": "Invalid API Key." }

The full list, with the message to show the customer, is on the Error codes page.

Limit Details
Amount Whole number from 100 to 1,000,000 XOF per charge.
No idempotency Every POST /charges/ creates a new charge, even with the same ext_id. Before retrying, follow Reconciliation.
No cancellation through the API A pending charge stays pending until confirmed or failed. Ignore it on your side.
Refunds See Refunds.

With an sk_test_ key, use these numbers with their paired amount. The test OTP is always 123456.

Operator Behavior in test mode
Orange, Coris, Sank, Moov (OTP) The charge is send_otp. Submit 123456.
Moov with confirmation_method: "ussd" The charge is pay_offline and becomes success about 5 seconds later if number and amount match, otherwise failed.
Benin (mtn_bj, moov_bj) Not available in test mode.