Overview
Niobi’s Unified Payments API allows your application to disburse funds to recipients across Africa through a single standardized integration. Whether disbursing via Mobile Money (M-Pesa, MTN, Airtel, Orange, Wave), Bank Transfers, Business Paybills, or Till Numbers, you send a signed request to the unified payments endpoint: Endpoint:POST /api/v4/niobi-unified-payments
Disbursements follow an asynchronous lifecycle:
Step 1Request Initiation
payment_step: 1- Your backend signs the request envelope (SHA-256) and sends
POST /api/v4/niobi-unified-payments. - Niobi validates the signature and params, and checks your merchant wallet balance.
- Niobi returns the initial HTTP response to the request when it’s successful, confirming the payout was accepted and dispatched upstream.
Step 2Terminal Outcome
payment_step: 2- Niobi submits the payout to the recipient’s telco or banking switch.
- The switch credits the recipient’s wallet or bank account, then reports settlement back to Niobi.
- Niobi sends an asynchronous callback to your
client_callback_urlwith the final status.
API Environments & Base URLs
Niobi provides separate environments for sandbox testing and live disbursement processing:
All payout endpoints referenced throughout this documentation are relative to your chosen environment’s base URL.
Understanding Payment Steps (payment_step)
Like collections, disbursements operate on a two-step lifecycle:
Step 1Request Initiation
payment_step: 1Initial HTTP response to the request when it’s successful, confirming the payout was validated and dispatched to the destination telco/bank switch.
Step 2Terminal Outcome
payment_step: 2Asynchronous callback delivering the final settlement outcome (success or failed).
1. payment_step: 1 (Initial API Response)
- Delivery: Synchronous HTTP response returned immediately when calling
POST /api/v4/niobi-unified-payments. - Meaning: The request passed signature validation, parameter formatting was accepted, merchant wallet balance was confirmed, and the disbursement instruction was dispatched to the destination telco or banking switch.
- Important: This confirms that the transfer has been initiated, not that funds have settled in the recipient’s wallet or account.
Absence of
If a disbursement request fails during initial submission (for example, due to invalid recipient details, unsupported corridor, insufficient merchant wallet balance, or immediate processor rejection returning
payment_step on Initiation Failures:If a disbursement request fails during initial submission (for example, due to invalid recipient details, unsupported corridor, insufficient merchant wallet balance, or immediate processor rejection returning
status_code: "000005"), the "payment_step" field is not present in the response. Your backend must inspect status_code ("000000" vs "000005") rather than assuming payment_step is always returned.2. payment_step: 2 (Terminal Callback)
- Delivery: Asynchronous callback POST request sent to the
client_callback_urlpassed underparams.client_callback_urlin your request. - Meaning: The transaction has reached its final terminal state. Funds have either been credited to the recipient or the payout was rejected/refunded by the banking/telco switch.
- Action: When
"payment_step": 2is present in theparamsobject of the callback, update your internal ledger and record the outcome based onstatus: "success"(status_code: "000000") orstatus: "failed"(status_code: "000005"). Full details are covered in Payout Callbacks.
Request Parameters
The unified payments endpoint accepts standard parameters wrapped in the signed envelope:Root Envelope Fields
Parameters (params Object)
Channel-Specific Parameter Objects (params)
Depending on your selected payment_method_type, supply the matching nested array inside params:
3-Step Direct Payout Integration Walkthrough
1
1. Initiate Disbursement Request
Your backend server signs the payload and dispatches a POST request to
/api/v4/niobi-unified-payments.Sample Request: Mobile Money Payout (Kenya M-Pesa)
Sample Initial API Responses (Synchronous)
- Initiation Successful (payment_step: 1)
- Initiation Failed
Understanding the Two Success Indicators:
- Outer
"success": true(Root level): Indicates the HTTP request was valid, authenticated, and received by Niobi (Request Successfully Initiated). - Inner
"status": "success"(Insidedata): Indicates the payout instruction was accepted and dispatched to the upstream network switch. It does not signify final delivery to the recipient.
2
2. Upstream Processing by Telco / Banking Switch
Niobi routes the disbursement to the local payment provider or mobile network operator. The switch processes the transfer and deposits funds into the recipient’s wallet or bank account.
3
3. Handle Final Disbursement Outcome
When settlement concludes, Niobi dispatches an asynchronous callback containing
"payment_step": 2 to the client_callback_url passed under params.client_callback_url in your disbursement request.Sample Terminal Callbacks (payment_step: 2)
- Successful Payout (000000)
- Failed Payout (000005)
On-Demand Status Verification:
If you ever need to independently verify the status of a payout on demand, call the Get Transaction Status API (
If you ever need to independently verify the status of a payout on demand, call the Get Transaction Status API (
POST /api/v3/get-unified-transaction-status) passing "type": "payout" and your transaction reference in "id".
