This section is designed to help developers integrate with our API more efficiently and reliably. It highlights best practices, common pitfalls, and configuration tips. We strongly recommend reviewing this page before starting your integration.Documentation Index
Fetch the complete documentation index at: https://docs.niobi.co/llms.txt
Use this file to discover all available pages before exploring further.
Phone Number Validation
Proper phone number validation is essential to avoid rejected transactions or delivery failures. Here’s what to keep in mind:Validation Rules
- Length Requirements:
- Minimum: 8 digits (excluding country code)
- Maximum: 15 digits (including country code)
- Characters:
- Only digits allowed. No spaces,
+, or symbols.
- Only digits allowed. No spaces,
Country Code Formatting
- Always prepend the correct country code.
- Example:
- Kenya:
254712345678 - Ghana:
233501234567
- Kenya:
- Do not prefix with
+,00, or local formats like07xxx. - Correct:
254712345678(Kenya) - Incorrect:
+254 712 345 678or0712345678
Common Pitfalls
- Using local formats (e.g.,
0712...) without converting to international format. - Adding trailing symbols like +
- Mismatching the country code with the country specified in the API request
Callback Configuration
Callbacks allow us to notify your system of transaction events. To ensure proper delivery, follow the setup guidelines below:Required Fields
- Your endpoint must accept POST requests with:
referencestatusamounttimestamptransaction_id
Valid Endpoint Format
- Must be publicly accessible.
- Should respond with HTTP status
200to confirm receipt.
Expected responses
- The expected status codes and statuses sent within the callback body can be found here
Callback Testing Tips
- Use tools like Webhook.site or Postman’s Mock Server for initial testing.
- Monitor logs to ensure your server handles callback retries properly.
- Simulate various status codes (e.g.,
failed,success,pending) for robust testing.
Transaction Status API Usage
The Transaction Status API lets you query the transaction status besides the callback notifications.When to Use It
- To verify transaction status post-callback
- To check pending or delayed payments
Best Practices
- Avoid frequent polling — respect API rate limits.
- Cache results where possible to reduce unnecessary requests.
- Always handle
4xxand5xxerrors gracefully:- Retry on 5xx with exponential backoff.
- Log and escalate 4xx (e.g.,
404for invalid reference).

