Finova Payments

Documentation

U

Documentation

Integration guide and API reference.

Overview

Finova Payments sits in front of TIPs and routes payment webhooks to your app. Each invoice you issue gets a unique Lipa Number bound to a settlement entity; an entity in open-amount mode instead carries one reusable counter QR that accepts many payments. When the customer pays, the router persists the raw payload, dedupes by transid, signs a clean payload with your whsec_, and POSTs it to your callback URL. Funds accumulate per entity and are paid out on your schedule.

Account & first login

  1. Your admin creates your account in Django admin with an email + temporary password.
  2. You sign in at /login. You'll be forced to pick a new password.
  3. You enrol an SMS 2FA number (Tanzania E.164 format e.g. +255787123456).
  4. Every subsequent login requires email + password + a fresh 6-digit SMS code.

Cannot get the temp password? Ask your administrator — passwords are never sent through the dashboard.

API keys (server-to-server)

Your dashboard session uses JWT cookies. Your backend talks to us with a Stripe-style API key:

sk_live_<keyid>.<secret> sk_test_<keyid>.<secret>
  1. Sign in to the dashboard.
  2. Open API Keys in the sidebar.
  3. Click Create key. Pick a name, env, and scopes.
  4. Copy the full sk_live_… from the green banner. It is shown only once.
  5. Store it in your backend's secrets manager. Set it on every request as Authorization: Bearer sk_live_…

Available scopes

  • apps:read
  • apps:write
  • entities:read
  • entities:write
  • till_alias:read
  • till_alias:create
  • webhooks:read
  • webhooks:write
  • ledger:read
  • lookups:read
  • settlements:read
  • settlements:write
  • disbursements:write
  • reversals:read
  • reversals:write
  • api_keys:read
  • api_keys:write
Use sk_test_… while building. Disbursement is gated on KYC for every key — see below.

OpenAPI specification

The platform publishes a machine-readable OpenAPI document that follows OpenAPI Specification Version 3.1.1.

GET /openapi.json

Use this document with Swagger UI, Swagger Editor, SDK generators, or contract tests. The schema covers the authenticated /v1/ API, public health check, inbound payment webhook, and settlement-machine callback.

Register your app

An app is your downstream application. It has one callback URL and one signing secret. Multiple entities settle under it.

POST /v1/apps/ Authorization: Bearer sk_live_… Content-Type: application/json { "app_id": "SCHOOLFEES", "name": "School Fee System", "callback_url": "https://yourapp.example.com/webhooks/router" }

The response contains whsec_…. Copy it once and store it in your backend secrets. It signs every inbound webhook from us.

To rotate: POST /v1/apps/<app_id>/rotate-webhook-secret/. Both old and new secrets are valid for a 24-hour overlap window.

Settlement entities

An entity is who gets paid — a school, a vendor, a branch. Each entity has its own settlement details (bank or mobile money), KYC status, payout schedule, and optional fee/reserve overrides. The entity id is generated for you.

POST /v1/apps/SCHOOLFEES/entities/ { "name": "St Marys Primary", "is_active": true, "open_amount": false }

open_amount chooses the payment mode at creation and defaults to false:

  • false — bounded: every Lipa Number has a fixed payable_amount (invoices, instalments).
  • true — open amount: the entity can hold one active, reusable counter QR that accepts any number of payments.

The mode is strict: once the entity has Lipa Numbers, you cannot switch it to the other mode. Settlement and payout destination are configured separately through GET/PUT /v1/apps/{app_id}/entities/{entity_id}/disbursement-settings/ (see Settlement & payouts).

Issue a Lipa Number

The endpoint is the same for both entity modes; the body differs only in payable_amount. Use your own opaque references to link payments to your records, and always send an Idempotency-Key: if your client retries on timeout we return the original response instead of allocating a second Lipa Number.

Fixed amount — invoice or instalment

For a bounded entity (open_amount: false), payable_amount is required and must be greater than zero. It is the amount the payer must send.

POST /v1/lipa-number/ Authorization: Bearer sk_live_… Idempotency-Key: lipa-INV-2026-00481 { "app_id": "SCHOOLFEES", "entity_id": "ST-MARYS", "display_name": "F. Ngoiya — Term 1", "external_reference": "INV-2026-00481", "payer_reference": "STUDENT-2841", "payable_amount": "500000", "currency": "TZS" }

The response includes a scan-to-pay QR code as a PNG data URI. Show the QR code and payable amount to the payer:

{ "till_alias": { "display_name": "F. Ngoiya — Term 1", "payable_amount": "500000", "currency": "TZS", "external_reference": "INV-2026-00481", "payer_reference": "STUDENT-2841", "qr_code": "data:image/png;base64,..." } }

Open amount — reusable counter QR

For an entity created with open_amount: true, omit payable_amount (or send null). The QR carries no amount, so one active Lipa Number can accept any number of customer payments. A second active Lipa Number on the same entity is rejected.

POST /v1/lipa-number/ Authorization: Bearer sk_live_… Idempotency-Key: counter-SHOP-1 { "app_id": "RETAIL", "entity_id": "SHOP-1", "display_name": "Main counter", "external_reference": "COUNTER-1", "currency": "TZS" }

The response returns "payable_amount": null. Display the QR without an amount; the payer or cashier enters the purchase amount in the payment app.

Every payment is priced and booked individually, and each produces its own payment.confirmed webhook. Reconcile the till from transid, amount, and phone. memo carries the counter's external_reference, which is the same for every sale — use transid as the unique payment key.

One QR per counter. Create the entity with open_amount: true once. The flag is a birth mode: it cannot be flipped after Lipa Numbers exist in the other mode.

Receive payment webhooks

When the customer pays, we POST to your callback_url with:

POST {your callback_url} Content-Type: application/json X-Webhook-Id: 4821 X-Webhook-Timestamp: 1715000000 X-Webhook-Signature: t=1715000000,v1=<HMAC-SHA256> { "webhook_id": 4821, "transid": "504-APCTZ…", "amount": "502500", "currency": "TZS", "phone": "255787…", "app_id": "SCHOOLFEES", "memo": "INV-2026-00481", "utilityref": "63675386", "result": "SUCCESS", "received_at": "…" }

For an open-amount counter QR, memo identifies the counter and is the same on every sale. Use transid as the unique payment key and match on amount + phone.

Verify the signature

  1. Reject if |now − t| > 300 seconds.
  2. Compute HMAC-SHA256(whsec_, "<t>." + raw_body).
  3. Compare against v1 with hmac.compare_digest.
  4. Return HTTP 200 within 10 seconds.

A reference Python verifier ships in the SDK as payments.verify.WebhookVerifier.

Idempotency on your side too. We retry up to 5 times with exponential backoff (1, 2, 4, 8, 16 min). Your handler must be safe to call twice with the same transid.

Settlement & payouts

Each entity settles on its own schedule (daily, weekly, monthly, or manual). The router computes a batch, optionally holds a reserve, and stages a disbursement instruction that the outbox worker submits to Selcom.

Disbursement destination API

Use these endpoints from your backend to list supported payout destinations and configure where each entity should receive settlements.

GET /v1/disbursement-options/ Authorization: Bearer sk_live_...

Response:

{ "mobile_money": [ { "name": "Vodacom M-Pesa", "utilitycode": "VMCASHIN" } ], "bank": [ { "name": "CRDB BANK LIMITED", "code": "CRDBBANK" } ] }
GET /v1/apps/{app_id}/entities/{entity_id}/disbursement-settings/ PUT /v1/apps/{app_id}/entities/{entity_id}/disbursement-settings/

Mobile money request:

{ "rail": "mobile_money", "destination": { "utilitycode": "AMCASHIN", "msisdn": "+255 684 123 456" } }

Bank request:

{ "rail": "bank", "destination": { "bank_code": "CRDBBANK", "account_number": "0151234567890" } }

Response:

{ "entity_id": "MERCHANT-A", "app_id": "PAYOUTS", "status": "pending_approval", "rail": "bank", "destination": { "bank_code": "CRDBBANK", "bank_name": "CRDB BANK LIMITED", "account_masked": "*********7890" }, "created_at": "...", "updated_at": "..." }

Trigger a payout

To move money to the entity's configured destination (mobile money or bank) outside the scheduled run, call one of these from your backend. Both compute the batch for the period if none exists, stage a disbursement instruction, and enqueue it for the async outbox worker — they never call Selcom inside the request. Requires the entity KYC to be approved and a payout_currency to be set.

POST /v1/disbursements/trigger/ Authorization: Bearer sk_live_... Content-Type: application/json { "app_id": "SCHOOLFEES", "entity_id": "ST-MARYS", "period_start": "2026-07-01", "period_end": "2026-07-05", "idempotency_key": "payout-july-week1" }

Requires the disbursements:write scope. Re-runnable for draft / failed batches (re-stages a new instruction). Response:

{ "batch_id": 42, "instruction_id": 17, "status": "ready_to_submit", "provider_transid": "", "amount": "100000.00", "payout_fee_amount": "2500.00", "provider_amount": "97500.00", "outbox_status": "pending" }

For a one-shot manual payout with an optional amount cap, use:

POST /v1/settlements/build-and-disburse/ Authorization: Bearer sk_live_... Content-Type: application/json { "entity_id": "ST-MARYS", "period_start": "2026-07-01", "period_end": "2026-07-05", "amount": "50000.00" }

Requires the settlements:write scope. amount is optional — when present it caps the disbursed amount below the full batch net. Rejects a rail that is in dry-run mode. Response:

{ "batch": { "id": 42, "entity_id": "ST-MARYS", "period_start": "2026-07-01", "period_end": "2026-07-05", "net_amount": "50000.00", "status": "pending", "..." : "" }, "instruction": { "id": 17, "rail": "qwiksend_bank", "status": "ready_to_submit", "amount": "50000.00", "provider_amount": "50000.00", "..." : "" } }

Settlement operations

  • GET /v1/settlements/?entity_id=ST-MARYS — list batches
  • GET /v1/settlements/{id}/lines/ — drill into ledger entries
  • GET /v1/settlements/{id}/events/ — outbound submission events for a batch

Payout destination lookups

Verify a mobile-money wallet or bank account before you initiate a payout. Both endpoints require the lookups:read scope, accept only public aliases, and never expose the provider routing codes used internally.

Lookups use the public aliases below. The destination-settings endpoints above continue to use the provider codes shown there.

Mobile money

POST /v1/lookups/mobile-money/ Authorization: Bearer sk_live_... Content-Type: application/json { "phone": "255658619447", "mobile_network": "vodacom" }

mobile_network is one of vodacom, airtel, mixx, ezypesa, halopesa, ttcl, or auto. Phone numbers may be sent as 255XXXXXXXXX, +255XXXXXXXXX, 0XXXXXXXXX, or a bare 9-digit local number; the API normalises them before the lookup. Use auto for a universal lookup across all mobile networks. Selcom does not expose a dedicated Vodacom (VMCASHIN) name lookup, so vodacom lookups automatically fall back to the auto/MNP route; the response still echoes the requested mobile_network. If neither the selected network nor auto can perform a lookup, the API returns 422 lookup_not_supported.

auto routes by MNP. The response echoes auto and does not report which network Selcom detected; use a network-specific alias when you need that in the response.

Bank

POST /v1/lookups/bank/ Authorization: Bearer sk_live_... Content-Type: application/json { "account_number": "001234567890", "bank": "nmb" }

bank is the public bank alias. Common aliases include nmb, crdb, access, nbc, stanbic, kcb, exim, dtb, absa, and selcom-pesa; ask your integration contact for the full list.

Success response

{ "found": true, "name": "Juma Ally", "mobile_network": "vodacom", "masked_phone": "2556****447", "lookup_id": "lk_01JABCDEF..." }

Bank lookups return bank and masked_account instead of mobile_network and masked_phone. Full phone and account numbers, provider codes, and provider references are never returned.

Not found

A provider “not found” result is a successful lookup with found: false — not an HTTP error. Do not retry it.

{ "found": false, "mobile_network": "vodacom", "masked_phone": "2556****447", "lookup_id": "lk_01JABCDEF...", "reason": "not_found" }

Lookup errors

StatusMeaning
400Invalid phone/account number or unknown public alias
403API key lacks the lookups:read scope
422Neither the selected mobile network nor the auto route can perform a lookup (lookup_not_supported)
429Per-key lookup rate limit exceeded (30 per minute by default)
503Rail disabled or provider unavailable (lookup_unavailable); retry later

Unknown aliases and provider failures return an error_code and detail, for example {"error_code": "unknown_bank", "detail": "Unknown bank."}.

Reversals

Request a collection reversal from the transaction row. An administrator approves the request before the workbook ledger changes.

POST /v1/payments/reverse/ Authorization: Bearer sk_live_... Content-Type: application/json { "payment_id": 123, "reason": "Customer dispute" }

The response records a pending request. Use GET /v1/payments/reversals/?app_id=SCHOOLFEES&entity_id=ST-MARYS to view the entity's reversal history.

Creating a request requires reversals:write; viewing history requires reversals:read. The payment must belong to an app you can administer.

Subscription webhooks

If your app charges a subscription, a subscription.charged webhook is sent to the entity's subscription_webhook_url when a charge is applied to a settlement batch.

 POST {subscription_webhook_url} Content-Type: application/json X-Webhook-Id: {event_id} X-Webhook-Timestamp: {unix_timestamp} X-Webhook-Signature: t={unix_timestamp},v1={HMAC-SHA256} { "event": "subscription.charged", "event_id": "550e8400-e29b-41d4-a716-446655440000", "app_id": "SCHOOLFEES", "entity_id": "ST-MARYS", "charge_id": "sub-charge-12345", "amount": "1500.00", "currency": "TZS", "period_start": "2026-07-01T00:00:00Z", "period_end": "2026-07-31T23:59:59Z", "occurred_at": "2026-07-29T12:00:00Z" } 

Verify signature using the same HMAC-SHA256 flow as payment webhooks. Deduplicate by charge_id.

KYC required before go-live

Disbursement is blocked until each settlement entity passes KYC — this applies to every key regardless of its env. Submit the documents below for each entity you intend to receive payouts to.

For the operating company (account holder)

  • Certificate of incorporation / business licence
  • TIN (Tax Identification Number) certificate
  • VAT certificate if VAT-registered
  • Memorandum & articles of association
  • Board resolution authorising the use of Finova Payments and naming the signatories
  • Beneficial owners (≥10%): full names, IDs, residential addresses
  • Directors' national IDs or passports
  • Recent utility bill or bank statement showing the registered address

Per settlement entity

  • Legal name, trading name, physical address
  • Authorised contact: full name, role, email, mobile
  • For bank settlement: bank name, branch, SWIFT, account number, account name — plus a recent bank statement (≤3 months) confirming the account
  • For mobile money settlement: registered MSISDN + a screenshot of the Lipa Number or merchant account showing the account name
  • Sample invoice or receipt template you will issue to your end customer

Compliance attestations

  • AML / CTF declaration (signed)
  • Sanctions screening consent
  • Data processing agreement (we sign one with you)
  • Maximum expected monthly volume + average transaction size
  • List of jurisdictions you operate in

How to submit

  1. Create the entity in the dashboard with KYC status pending.
  2. Email scanned PDFs of every document above to kyc@your-domain.example, referencing the app_id and entity_id in the subject line.
  3. Our compliance team reviews within 3–5 business days.
  4. Approved entities flip to kyc_status: "approved". Live sk_live_ calls against that entity begin working.
  5. Re-submission required if any of the underlying facts change (new bank account, new beneficial owner, etc.).
Until KYC is approved, POST /v1/disbursements/trigger/ and POST /v1/settlements/build-and-disburse/ for that entity fail with a KYC validation error. The env on your API key does not bypass this gate.

Error format

All endpoints return JSON. Errors look like:

{ "error": "human-readable message", "detail": "...optional..." }
StatusMeaning
400Bad request — body invalid or business rule violated
401Missing / invalid / revoked API key or JWT
403Authenticated but lacking scope or accessing another tenant's resource
404Resource not found (or not owned by caller)
409Idempotency-Key reused with different body, or unique-key clash
429Per-key rate limit exceeded
500Persisting raw webhook failed — TIPs retries on their side

Support

Stuck or unsure? Email support@your-domain.example with your app_id and the request_id we return in the X-Request-Id header. We can trace any request in our audit log.