Skip to main content
This section explains how to execute payouts using Niobi’s Payment API, covering various payment channels and the payout process. To start making payments using these methods, ensure that your Niobi account is set up and verified. Refer to the ‘Setting up a Niobi Account’ section in the Getting Started section for detailed steps on account creation and setup.

Using the API

The unified-payments api endpoint is used for making payments across the supported countries. Please find the full API reference here. You will be required to pass in the following parameters. You will then generate a signature using the parameters above and proceed to make an api request using the payload. Refer to Signature Generation for signing requests. On successful payment, you will receive a callback response with the transaction details. Please find a detailed description of the callback response under Callback URL Section.
Please note that all live transactions made through our API are subject to a transaction fee.

High-Level Integration

This section provides a high-level overview of how to integrate with the Disbursements API.
1

Initiating the Unified Disbursements API Request

To begin, generate a signature for your api request using the generate signature api endpoint and initiate a payout transaction by making an API request.

Sample API Request

Sample API Request for Cameroon (XAF Payouts)

For XAF Payouts, the sender’s details are required as part of local regulatory requirements.

Sample Initial API Response (Successfully Initiated)

Sample Initial API Response (Failed to Initiate)

payment_step: 1 is only included when the request is successfully initiated with the processor (status_code: 000000). If initiation fails (status_code: 000005), the response has no payment_step field at all. Either way, this is an acknowledgement of the request, not the final result.
The message field in the data object describes the result of initiating the payout. Its exact wording may vary depending on the payment processor or channel, for example:
  • “Payment process initiated successfully.”
Refer to payment_step and status_code (above) to determine the correct handling, not this message text.
2

Handling Transaction Status

Once the transaction has been processed, you have two options for managing the transaction status:
  1. Receiving a Callback. A callback response containing the transaction details will be sent to your configured URL. You can set up an endpoint on your front end to handle this callback and update the user interface accordingly, such as displaying success or failure messages based on the transaction outcome. See more about callback responses here

    Sample Callback Response (Success)

    Sample Callback Response (Failed)

    When "payment_step": 2 is present in the params of the callback body, it means this callback is final for the transaction: act on it. It’s sent for both a successful ("status_code": "000000") and a failed ("status_code": "000005") transaction status, not the request’s own success. Mark the transaction with whatever status and statusCode is in the params object: that’s the final outcome.
  2. Periodically Querying Transaction Status. Alternatively, you can query the transaction status endpoint periodically (recommended for 2 minutes) to check for updates on the transaction status.

Conditional SMS Notifications for External Beneficiaries (KES Payouts)

For payout transactions in Kenyan Shillings (KES), you can request conditional SMS notifications to be sent to external beneficiaries. This feature allows you to opt-in for SMS alerts to recipients outside your organization. To enable this feature, contact our support team via email at support@niobi.co to request activation.