Prerequisites
- A Kori merchant account with an API key and secret (dashboard → API Keys).
- The key must include the scopes you intend to use here:
payandbalance.
1. Get a token
Exchange your key + secret for a Bearer token. Request only the scopes you need.Response
data.token — you’ll send it on every subsequent request.
2. Check your balance
3. Collect a payment
This prompts the customer’s phone to approve the payment.Response (202 Accepted)
4. Check the payment status
Three ways, in order of preference — see Payment status for the full picture. Wait for the webhook. Subscribe topayment_received and Kori tells you:
no polling, and it arrives even if the customer closes the tab.
Read your transaction record:
reference — authoritative while the payment is
still open, and needs no token, so a checkout page can poll it from the browser:
success, the funds are credited to your balance and you can fulfill
the order. While it is pending the customer simply has not answered yet — that is not
a failure, so keep waiting rather than retrying the charge.
Next steps
Scopes
See every permission an API key can grant.
Webhooks
Get notified when payments settle.
Payment status
Pending, success or failed — and how to tell them apart.