You need an API key and a reachable
callbackUrl — see the Quickstart if you haven’t set those up. For this flow you also need a customer record for the person paying, and the crypto wallet address to deliver to.1. Get a Rate Quote
Fetch the current exchange rate before initiating so you can show the customer what crypto amount they’ll receive. Call Get Onramp Exchange Rate with the fiat currency and crypto token.2. Initiate the Onramp
Call Create Onramp with yourcallbackUrl and the destination crypto wallet address. The API responds immediately with a PENDING transaction. The exchange rate is locked at this point.
3. Customer Pays
- Mobile money — the customer receives an STK push (M-PESA, Airtel) or USSD prompt (MTN, others) and confirms by entering their PIN
- Bank checkout — the response includes a
checkoutUrl; redirect the customer there to complete payment on the bank’s page
4. Crypto is Delivered
Once fiat payment confirms, Kotani Pay converts at the locked rate and sends crypto to the wallet:CRYPTO_PENDING— fiat confirmed, crypto transfer in progressPROCESSING— blockchain transaction submitted, awaiting on-chain confirmationsSUCCESS— crypto delivered
5. Kotani Pay Notifies You
Kotani Pay POSTs to yourcallbackUrl when the transaction reaches a terminal state:
SUCCESS— crypto delivered to the walletFAILED— transaction failed; fiat refunded automatically
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 transaction fields are posted directly to your callbackUrl. See Webhooks for both modes, and the onramp payload for every field you receive with a worked example.6. Poll for Status
- Get Onramp Status (by Reference ID) — standard onramp status
- Get Crypto Onramp Status (by Reference ID) — crypto delivery status
Monitoring from the Dashboard
- Log in to backoffice.kotanipay.com
- Use the country and currency selector to filter by market
- Navigate to Onramp in the left sidebar