Overview
Niobi supports two methods for generating request signatures:- In Code (Custom Implementation): Run our deterministic SHA-256 signing algorithm directly on your backend server. Recommended for production.
- Via the Niobi Signature Generation API (
POST /api/niobi-signature): Call Niobi’s helper endpoint to automatically compute and return the signed payload.
Important:
In both methods, the inner
params contains whatever the destination endpoint requiresIn both methods, the inner
"params": { ... } object is dynamic. It is not limited to a fixed set of fields; it must contain whatever specific parameters are required by the target API endpoint you are invoking (e.g., Collections parameters for collections or Payout parameters for disbursements).Method 1: The Request Signing Algorithm (In Code)
For production environments where you want to minimize network latency and generate signatures entirely within your backend infrastructure, implement the following 10-step algorithm:-
Obtain Credentials: Log into your Niobi Dashboard, navigate to Workspace -> Integrations, and create an integration entity. Note your
client_id,sender(integration title), andsenderKey(Secret Key). -
Assemble the Pre-Signing Object: Create a JSON object containing your target endpoint parameters inside a nested
paramsobject, along with your metadata fields: -
Add a Salt (
salt): Provide your own random string (for example, 16 to 32 alphanumeric characters). This is not provided by Niobi; it is an additional security and entropy layer you control on your server to guarantee that every payment request produces a unique signature. -
Include Client ID & Secret Key: Set
"client_id"with your integration’s Client ID. Temporarily add your private Secret Key as"senderKey". -
Add Integration Title (
sender): Pass the exact integration name registered in your dashboard as"sender". -
Sort Alphabetically (Recursive K-Sort): Sort all keys alphabetically in ascending order, applying the sort recursively for nested objects (such as
params). -
Stringify Key-Value Pairs: Convert the sorted structure into a single string formatted as
key=value, concatenated with&. Nested properties are represented using dot notation (e.g.params.amount=10000).Important URL Formatting: Thecallback_url(orclient_callback_url) must not be URL-encoded in the stringified hash representation. For example:...¶ms.callback_url=https://yourdomain.com/niobi/callback&... - Hash the String with SHA-256: Apply the SHA-256 hashing algorithm to the concatenated string. This produces a 64-character hexadecimal hash string.
-
Attach the Signature: Insert the resulting hash into the root JSON object as the
"signature"field. -
Remove the Secret Key (
senderKey): Delete the"senderKey"field from the payload completely before dispatching the request over the network.
Detailed Payload Walkthrough
1. Before Signing (Pre-Signature Payload)
2. Flattened, Sorted and Stringified Format
3. Final Signed Request Payload (Ready to Send to the Matching API Endpoint)
Implementation Code Examples
- Node.js / TypeScript
- Python
- PHP
- Java
- Go (Golang)
- C# / .NET
Method 2: Generating Signatures via the Niobi Signature Generation API
If you prefer not to write custom cryptographic sorting and hashing functions, or if you want to quickly test requests in Postman or Sandbox, Niobi provides a dedicated Signature Generation endpoint: Endpoint:POST /api/niobi-signature
Step 1: Send Your Request Parameters to the Signature Endpoint
Construct a request containing the following fields:Step 2: Receive the Complete Signed Payload
Niobi validates yourclient_id, calculates the SHA-256 signature using your account’s registered Secret Key, and returns the full signed envelope inside the data object:
Step 3: Pass the Signed Payload to the Target API
You can now take the exact JSON object insidedata and send it directly to your target endpoint (e.g. POST /api/v4/niobi-unified-collections or POST /api/v4/niobi-unified-payments) without changing or modifying anything as it is.
Verifying Response & Webhook Signatures
When receiving a synchronous response or asynchronous webhook callback from Niobi, you can verify its authenticity using either code or the Verification API:1. In Code (5 Steps):
- Extract Signature: Store the
"signature"field from the incoming JSON and remove it from the object. - Add Secret Key: Add
"senderKey": "your_secret_key_here"into the object. - Sort and Stringify: Alphabetically sort keys recursively (K-sort) and format into
key=valueconcatenated with&. - Compute SHA-256 Hash: Hash the string with SHA-256.
- Compare Signatures: Compare your computed hash with the signature received in Step 1.
2. Via the Verification Helper API:
Send the payload toPOST /api/niobi-verify:

