Skip to main content
This guide takes you from an API key to a live collection in four requests.

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: pay and balance.
Use the Sandbox base URL https://dev.kori.ml while testing.

1. Get a token

Exchange your key + secret for a Bearer token. Request only the scopes you need.
Response
Save 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)
status: "pending" means the prompt was sent, not that the customer paid. Do not fulfill the order yet.

4. Check the payment status

Three ways, in order of preference — see Payment status for the full picture. Wait for the webhook. Subscribe to payment_received and Kori tells you: no polling, and it arrives even if the customer closes the tab. Read your transaction record:
Or ask the operator right now, by reference — authoritative while the payment is still open, and needs no token, so a checkout page can poll it from the browser:
When the status is 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.