API Reference (Transactions)
The Zanga Transactions API is the technical gateway to our high-performance ledger. Every transaction is immutable and forensic-ready.
Request/Response Lifecycle
Every request to Zanga returns a X-Zanga-Audit-ID header.
[!IMPORTANT] In the event of a dispute or failure, this ID is the unique forensic identifier for the BigBill ledger watchdog.
Endpoints
1. Initiate Payment
POST /v1/api/transactions
Body:
amount: Decimal (in Ngwe/ZMW)currency: "ZMW"reference: String (your internal ID)description: Stringsource: Object (for Mobile Money:{ "type": "mobile_money", "carrier": "mtn_zm" | "airtel_zm", "number": "String" })
2. Check Balance
GET /v1/api/balance
Returns the current balance of the tenant.
Response: { "success": true, "data": { "available": 25000.50, "escrow": 5000.00, "currency": "ZMW" } }
3. Escrow Settlement
POST /v1/api/escrow/settle
Releases funds held in escrow. Requires transaction_id.
Error Taxonomy (Forensic Depth)
| Code | Type | Meaning | Action |
|---|---|---|---|
LDR-001 | Ledger Violation | Immutable check failed. | Contact Support immediately. |
CAR-001 | Carrier Timeout | MTN/Airtel did not respond. | Implement exponential backoff. |
AML-001 | Risk Flag | Transaction flagged by FIC watchdog. | Verification required. |
TEN-001 | Isolation Error | Tenant boundary breach attempted. | Account locked for safety. |
AUTH-401 | Invalid Key | API Key expired or revoked. | Rotate in Developer Portal. |