Skip to main content

Kenya

Supported payment methods and integration details for Kenya

Kenya flag

Country Details

Country ID: 1  •   Country Code: 254  •   Currency: KES (Kenyan Shilling)

Supported Payment Methods & Payload Requirements


Payment Flow: How It Works

Deposits (Collections via STK Push)

  1. Initiation: Send a signed POST request to the Unified Collections endpoint with payment_method_type: "send money", country_id: 1, currency: "KES", and the customer’s phone number in mobile (format: 2547XXXXXXXX).
  2. Handset Prompt: The customer receives an on-screen prompt on their phone to enter their PIN and authorize the transfer.
  3. Initial Acknowledgement: Niobi returns an immediate response (payment_step: 1) containing the assigned depositId.
  4. Webhook Delivery: Once the payment completes, Niobi sends an asynchronous webhook callback (payment_step: 2, status: "success") to your callback_url.

Payouts (Disbursements)

When making a payout via the Unified Payments endpoint, pass the appropriate payment_method_type along with its required nested method array:
  • Send Money (B2C): Pass payment_method_type: "send money" with a sendmoney array carrying phone_number.
  • PayBill (B2B): Pass payment_method_type: "pay bill" with a paybill array containing paybill_number and account_number.
  • Till Number (Buy Goods): Pass payment_method_type: "till number" with a tillnumber array containing till_number.
  • Pesalink (Bank Transfer): Pass payment_method_type: "pesalink" with a pesalink array carrying bank_name, bank_code, branch_name, account_name, and account_number.
  • Airtel Money: Pass payment_method_type: "Airtel" with an Airtel array containing phone_number.
Pass one of the following codes as bank_code in the pesalink array when initiating a bank payout:

Sample Requests & Responses

M-Pesa STK Push Deposit Request

Deposit Response (Initiation)

This is the initial acknowledgement. payment_step: 1 means the request was accepted and the STK prompt was pushed to the user’s handset. Await the terminal callback (payment_step: 2).

Payout Request (M-Pesa Send Money)

Payout Response (Initiation)


Webhook/Callback Examples

Successful Deposit Callback

Successful Payout Callback


Try it

Try it: POST /api/v4/niobi-unified-collections

Collections API reference for Kenya deposits.

Try it: POST /api/v4/niobi-unified-payments

Payments API reference for Kenya payouts.

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 at support@niobi.co to request activation.

Transaction Limits

For the full list of minimum and maximum transaction limits for Kenya (KES) collections and payouts, please see the Transaction Limits for Kenya section on the Transaction Limits page.