Korpay is an API-first wallet: every feature in the app — balances, transfers, merchant payments, payment requests — is reachable over the same REST API the Korpay app itself uses. There is no feature that exists only in the UI.
Who you are determines how you authenticate. There's no single "API key" — the right credential depends on your relationship with Korpay:
| Tier | Who it's for | How it authenticates |
|---|---|---|
| Direct | The Korpay app itself (web, and future native apps) | Normal email/password login — a user-facing concept, not a developer integration |
| Platform partner | A trusted super-app embedding Korpay as its payments layer — the way WeChat Pay sits inside WeChat. Credential-gated, not self-serve — talk to us | Server-to-server clientId/clientSecret, resolving your own users directly — no separate Korpay login for them, ever |
| Third-party developer | Any external app wanting to read a user's balance or send payments on their behalf, with that user's explicit consent | OAuth — register an Application, then each user approves your access on a Korpay-hosted consent screen |
The rest of this page covers the third-party developer path, which is self-serve. The platform-partner path is a direct integration we set up with you — get in touch.
Ask us for a Korpay Application (self-serve registration is coming; for now, contact us with your app's name, redirect URI, and which scopes you need). You'll get back a clientId and a clientSecret — the secret is shown once, so store it safely.
A token is restricted to exactly the scopes a user approved. There are three:
read — view balance and transaction historytransact — send transfers and withdrawals on the user's behalfmerchant — create and manage merchant accounts and payment requests on the user's behalfRequest only what you need — a user is more likely to approve a narrower request, and a stolen token is only as dangerous as its scopes.
Redirect the user's browser to Korpay's consent screen:
GET http://localhost:4002/connect
?client_id=YOUR_CLIENT_ID
&redirect_uri=https://yourapp.example/callback
&scope=read%20transact
&state=RANDOM_OPAQUE_STRING
The user logs into Korpay (if not already) and sees a consent screen naming your app and the exact permissions it's requesting. On approval, they're redirected back to your redirect_uri with a short-lived authorization code:
https://yourapp.example/callback?code=AUTH_CODE&state=RANDOM_OPAQUE_STRING
Always check that state matches what you sent — this is what prevents a forged callback.
curl -X POST http://localhost:4001/oauth/token \
-H "Content-Type: application/json" \
-d '{
"grantType": "authorization_code",
"code": "AUTH_CODE",
"clientId": "YOUR_CLIENT_ID",
"clientSecret": "YOUR_CLIENT_SECRET",
"redirectUri": "https://yourapp.example/callback"
}'
Response:
{
"accessToken": "eyJ...",
"refreshToken": "a1b2c3...",
"scopes": ["read", "transact"]
}
The access token is a normal bearer token — use it exactly like any Korpay session token. It expires; when it does, use the refresh token to get a new pair (refresh tokens rotate on every use — the old one stops working the moment you use it):
curl -X POST http://localhost:4001/oauth/token \
-H "Content-Type: application/json" \
-d '{
"grantType": "refresh_token",
"refreshToken": "a1b2c3...",
"clientId": "YOUR_CLIENT_ID",
"clientSecret": "YOUR_CLIENT_SECRET"
}'
Check the user's balance (read scope):
curl http://localhost:4001/wallets/me/balances \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
Send a transfer on their behalf (transact scope — recipient can be an email, a user's Korpay ID (KP...), or a merchant ID (KM...)):
curl -X POST http://localhost:4001/transfers \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"recipient": "KP7X9F2A",
"amount": "10.00",
"assetSymbol": "USDC",
"idempotencyKey": "a-uuid-you-generate"
}'
Create a merchant payment request (merchant scope):
curl -X POST http://localhost:4001/merchants/MERCHANT_ID/payment-requests \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"amount": "25.00", "assetSymbol": "USDC", "description": "Invoice #412"}'
A request missing a required scope gets a clear 403 — it never silently fails or does a partial action.
If your Application registered a webhook URL, Korpay pushes events to it as they happen (e.g. transfer.confirmed) rather than making you poll. Each delivery is signed:
POST https://yourapp.example/webhooks/korpay
X-Korpay-Signature: hex(HMAC_SHA256(body, your_webhook_secret))
{
"eventType": "transfer.confirmed",
"eventId": "stable-id-for-dedup",
"data": { "transactionId": "...", "amount": "10.00", "assetSymbol": "USDC", "direction": "credit" }
}
Verify the signature before trusting the payload, and treat eventId as your de-duplication key — a delivery may be retried (with backoff) if your endpoint doesn't respond with a 2xx, so your handler should be idempotent: check your own record of that event first, and no-op if you've already processed it.
Every endpoint below requires an access token (any tier) unless noted. (transact) / (merchant) marks the extra scope a third-party OAuth token additionally needs — a direct login session or a platform-partner token is never scope-restricted.
GET /wallets/me/balances — every asset balanceGET /assets — supported assetsGET /fees — current fee configurationPOST /transfers (transact) — send to an email, KP... user id, or KM... merchant idGET /transfers/:idGET /transactions — paginated historyPOST /merchants (merchant) — create a merchant account (a person can own several)GET /merchants / GET /merchants/:idGET /merchants/:id/balances / GET /merchants/:id/transactionsPOST /merchants/:id/payment-requests (merchant)GET /payment-requests/:id — viewable by anyone with the link, not just the merchantPOST /payment-requests/:id/pay (transact)POST /deposits/intent / GET /deposits/:idPOST /withdrawals (transact) / GET /withdrawals/:idGET /users/me — profile, including your publicId (KP...)GET /users/lookup?identifier= — resolve an email, KP..., or KM... id before sendingNeed something not listed here, or a platform-partner integration? Talk to us.
© 2026 Korpay.