Before You Start
- An API key — see API Keys
- A fiat wallet for the currency you’re collecting in
- A
callbackUrlon your server for payment notifications
1. Create the Payment Link
Call Create Payment Link (POST /api/v3/payment-links). At a minimum you’ll configure:
- Pricing type — fixed amount, variable (customer chooses within a range), package tiers, or open customer choice
- Payment methods — which of mobile money, bank checkout, card, and crypto to enable
- Usage limit — single-use, limited to a max count, or unlimited
- callbackUrl — where to receive payment notifications
2. Customer Pays
The customer opens the link in their browser. What happens next depends on the method they select:- Mobile money — the customer enters their phone number; Kotani Pay sends an STK push or USSD prompt; the customer confirms with their PIN
- Bank checkout — the customer is redirected to the bank’s hosted page to authenticate and authorise the payment
- Card — the customer enters card details on a secure page; 3DS challenge is handled inline if required
- Crypto — Kotani Pay shows a deposit address and QR code; the customer sends from their own wallet; the page updates as confirmations arrive
3. Kotani Pay Notifies You
When a payment succeeds, Kotani Pay fires apayment.confirmed event — to the link’s own callbackUrl if it has one, otherwise to your integrator-level webhook URL. The payload carries payment-link-specific fields (referenceId, shortCode, paymentMethod, amount, currency, plus token/network/transactionHash for crypto payments) — it is not the standard deposit payload.
There’s no equivalent event for a failed or expired payment — use Poll for Status to catch those.
If you have a webhook secret configured, the callback arrives in a signed envelope with
X-Kotani-Signature, X-Kotani-Event, and X-Kotani-Integrator headers. Without a secret, the payload is posted directly to your callbackUrl. See payment.confirmed in Webhooks for the full field reference.4. Poll for Status
GET /api/v3/payment-links/transactions/:referenceId— status of a specific paymentGET /api/v3/payment-links/:shortCode/transactions— all payments for a given link
Monitoring from the Dashboard
- Log in to the Kotani Pay dashboard
- Navigate to Payment Links in the left sidebar
- Click any link to see all transactions associated with it