Skip to main content

Overview

Once you have generated your signature, either locally via the SHA-256 algorithm or using the Niobi Signature Generation API, the final step is formatting and dispatching the HTTP request. Every Niobi API request follows a standardized envelope structure that bundles your authentication metadata with your specific payment parameters.
Pre-requisite: IP Whitelisting
Before sending any API requests to Niobi servers or endpoints (in Sandbox or Production), your server’s outgoing public IP address must be whitelisted in the Niobi Dashboard under Workspace -> IP Whitelisting. Requests sent from non-whitelisted IPs will be blocked. See our IP Whitelisting Guide for setup steps.

Request Envelope Structure

Every signed request to Niobi contains two tiers:
  1. Root-Level Authentication Metadata: Identifies your integration, timestamp, salt, and cryptographic signature.
  2. Nested params Object: Contains whatever specific parameters are required by the destination endpoint you are invoking.

Root Fields Specification

The params Object is Dynamic:
The outer fields (client_id, sender, timestamp, salt, signature) never change between endpoints. But the contents of "params": { ... } change to match the schema of the endpoint you are calling.

Complete Request Examples Across Endpoints

Endpoint: POST /api/v4/niobi-unified-collections
View Unified Collections API Reference ->

Sub-Merchant Parameter Placement

If you are operating multiple distinct brands or merchants under one master account:
  • Pass the approved sub-merchant UUID in params.sub_merchant_id.
  • The sub_merchant_id field must be included in the pre-signature object when generating the signature (either in code or via the Niobi Signature Generation API) so that the hash remains valid.
  • For more information on creating and managing sub-merchants, see Sub-Merchant Management.

Common Pitfalls & How to Avoid Them

Error: Security hazard and potential rejection.
Fix: The senderKey is strictly used on your server to compute the SHA-256 hash. Always delete senderKey before sending the payload over the wire.
Error: 403 - Request was not verified.
Fix: If any field in params or the root envelope changes (e.g. updating an amount or reference), the signature must be recomputed.
Error: Signature mismatch on the server.
Fix: When stringifying the pre-signature object, ensure callback_url remains unencoded (e.g. https://yourdomain.com/callback rather than https%3A%2F%2F...).
Error: Signature mismatch.
Fix: Ensure parameter types remain consistent (e.g. if amount is a number 10000, do not send "10000" as a string).
Error: Request blocked or connection refused.
Fix: Ensure your server’s outgoing public IP address is whitelisted in your Niobi Dashboard under Workspace -> IP Whitelisting. See our IP Whitelisting Guide.
Error: 403 - Request was not verified.
Fix: Trailing or leading whitespace can occur on your credentials (client_id, sender, senderKey) when copied from the dashboard, as well as on string parameter values inside params (e.g. callback_url, mobile, email, payment_reference). Always trim string values across all fields before computing the hash to prevent signature mismatches.

Next Steps

You are now ready to make authenticated API requests:
Payin

Collecting Payments

Learn how to initiate collections across mobile money, cards, and bank transfers.

Payout

Making Payments

Learn how to initiate disbursements and payouts across 17+ African markets.