Go-live checklist
What to check before you send your first live payout.
Work through this list before your first live payout. The API behaves the same in test and live mode. What changes is your credentials, your data, your money and, possibly, the account types a payout can reach.
Live credentialsLive business verificationLive depositLive originators and beneficiariesConvertFirst payoutEvents and reconciliation| # | Check | Section |
|---|---|---|
| 1 | Live secret stored server-side, in a secret manager | Credentials |
| 2 | Tokens and objects show livemode: true | Credentials |
| 3 | One access token cached and renewed shortly before it expires | Tokens |
| 4 | Every request that takes an Idempotency-Key sends one, and retries reuse it | Idempotency |
| 5 | Business verification ACTIVE in live mode, and stablecoins in a live custody wallet | Fund your live conversions |
| 6 | Originators and beneficiaries created again in live mode, and the account types live payouts can reach confirmed with Superpay | Live data |
| 7 | A live webhook subscription, with signatures verified and a backfill from the event log | Events |
| 8 | UNKNOWN is never treated as failed | Async states |
| 9 | Errors branch on code, and only the right errors are retried | Retries |
| 10 | Every payout carries your own reference, and you store its id | Reconciliation |
| 11 | X-Request-Id logged for every call | Contact |
Live credentials#
- Separate credentials per mode. Superpay issues a client ID (
cli_…) and a client secret for each mode. Live secrets start withsk_live_, test secrets withsk_test_. A test secret never works with a live client ID. - Same host. Test and live both use
https://api.withsuperpay.com. The credential decides the mode. No header, path or parameter can switch it. - Assert the mode. The token response and every object carry
livemode. In production, fail fast if it is nottrue. - Secrets stay server-side. Keep them in a secret manager. Never put them in a browser or mobile app, a repository or a log.
- Treat the secret as opaque. Do not validate its length or characters beyond the prefix.
- Least privilege. Request only the scopes a process needs, with the
scopeparameter on the token request. Omitscopeto get every scope your credential holds.
| Process | Scopes |
|---|---|
| Business verification and custody | treasury:manage treasury:read. Only treasury:read if your business is verified with the form and its people upload its documents there |
| Conversion | fx:quote fx:execute fx:read balances:read treasury:read |
| Onboarding | originators:write originators:read beneficiaries:write beneficiaries:read |
| Payouts | payouts:write payouts:read balances:read |
| Events and webhooks | events:read webhooks:manage |
| Reporting and reconciliation | payouts:read balances:read fx:read events:read |
Secrets are shown once
Superpay stores only a one-way hash of your secret and cannot show it again. If a secret is lost or exposed, ask Superpay for a new credential and to revoke the old one. Revocation stops new token requests at once. Tokens already issued keep working until they expire.
There is no API for creating, rotating or revoking credentials. See Authentication.
Access tokens#
- Cache the token. Reuse one token across requests. Token requests are slow by design, so never fetch a token per API call.
- Renew before expiry. Read
expires_in(seconds) from the token response instead of hard-coding a lifetime. There is no refresh token: call/oauth2/tokenagain. - Form-encode the token request. Send
application/x-www-form-urlencoded. A JSON body returns400 unsupported_grant_type. - Recover from expiry once. On
401 INVALID_TOKEN, fetch a new token and retry the request once. Do not loop. With the cache below, callaccessToken({ renew: true }). - Renew inside long polling loops. A loop that outlives
expires_inneeds a new token.
let cached = null; // { token, renewAt }
export async function accessToken({ renew = false } = {}) {
if (!renew && cached && Date.now() < cached.renewAt) return cached.token;
const credentials = Buffer.from(
`${process.env.SUPERPAY_CLIENT_ID}:${process.env.SUPERPAY_CLIENT_SECRET}`
).toString('base64');
const res = await fetch('https://api.withsuperpay.com/oauth2/token', {
method: 'POST',
headers: {
Authorization: `Basic ${credentials}`,
'Content-Type': 'application/x-www-form-urlencoded',
},
body: new URLSearchParams({ grant_type: 'client_credentials' }),
});
const body = await res.json();
if (!res.ok) throw new Error(`token request failed: ${body.error}`);
// Catch test credentials deployed to production, or the reverse.
const wantLive = process.env.SUPERPAY_LIVEMODE === 'true';
if (body.livemode !== wantLive) throw new Error(`unexpected livemode: ${body.livemode}`);
// Renew at 80% of the lifetime.
cached = { token: body.access_token, renewAt: Date.now() + body.expires_in * 800 };
return cached.token;
}Idempotency keys#
- Send
Idempotency-Keywherever it is taken: creates, corrections, cancels, conversions and webhook changes. 16–64 printable ASCII characters, no spaces. A UUID works. See When to send a key. - One key per operation. Generate the key and save it with your own record before you send the request, so a retry after a crash finds the same key.
- Retries reuse the key, the body and the path. Change the body and the API returns
409 IDEMPOTENCY_KEY_REUSED. - Never reuse a key for a different operation. Every credential on your account shares one set of keys per mode. Treat a key as bound to its first request for good.
- Replays can be out of date. A replayed response carries
Idempotent-Replayed: true. Its body can show an olderstatus.GETthe object for its current status.
| First request ended with | A retry with the same key returns | What you do |
|---|---|---|
2xx | The same status and the same object | Nothing more. GET for current state |
4xx (validation, REFERENCE_EXISTS, BENEFICIARY_NOT_PAYABLE…) | The same 4xx, every time | Fix the cause, then send with a new key |
5xx, timeout or no response | A fresh attempt, or the object the first attempt already created | Retry with the same key |
| Still running | 409 RESOURCE_LOCKED | Wait briefly, retry with the same key |
DELETE requests and document uploads take no key, and are safe to repeat. See Idempotency.
Fund your live conversions#
Your live business verification and custody account are separate from your test ones. Set them up again with a live token.
- Verify your business in live mode.
POST /v1/business-verification, then wait forstatus: ACTIVE, announced bybusiness.verification_updated. Upload any documents it asks for. If your business is verified with the form, you submit nothing: your people fill in the live form Superpay emails them, and you wait for the same event. See Business verification. - Deposit into a live custody wallet.
GET /v1/custodylists your live wallets. Send only the listed asset, on the listed network, to its address. Live wallets are on the real networks. See Custody account. - Size your wallets for your conversions. A conversion is funded from one wallet only. If no single wallet holds what it needs, accepting it returns
422 CUSTODY_BALANCE_INSUFFICIENT. - Convert to INR before paying out. Payouts draw on your INR balance. Create a quote, accept it before its
expires_at, and wait forEXECUTED. Quotes expire quickly, so accept straight away. See Conversions. - Cover amount plus fee. When a payout is processed,
amountplusfeemoves from INRavailabletoreserved. Ifavailableis short, the payout fails withINSUFFICIENT_FUNDS. - Watch
reserved. It holds money for payouts and conversions in progress. It returns toavailableif they fail or are cancelled, and leaves your balance when they complete.
/v1/balancesbalances:readcurl https://api.withsuperpay.com/v1/balances \
-H "Authorization: Bearer $SUPERPAY_TOKEN"{
"data": [
{
"object": "balance",
"currency": "INR",
"available": { "amount": 7305750, "currency": "INR" },
"reserved": { "amount": 0, "currency": "INR" },
"pending": { "amount": 0, "currency": "INR" },
"livemode": true
},
{
"object": "balance",
"currency": "USD",
"available": { "amount": 0, "currency": "USD" },
"reserved": { "amount": 0, "currency": "USD" },
"pending": { "amount": 0, "currency": "USD" },
"livemode": true
}
],
"has_next": false,
"object": "list"
}Amounts are in minor units: 7305750 is ₹73,057.50. pending is always 0 today. See The balance object.
Recreate your data in live mode#
- Test objects do not exist in live mode. An ID created in test mode is not found with a live token. Remove hard-coded test IDs.
- Create originators again and check that each one's
verification.payableistrue. An originator with everything a payout needs, its email included, isACTIVEas soon as it is created. See Originators. - Create beneficiaries again once their originator is
ACTIVE, and wait until each one is payable. Send the account number, IFSC, holder name and declared account type, and the account holder's date of birth, nationality, address and identity document: a beneficiary without them is accepted but cannot be paid. See Beneficiaries. - Confirm which account types can be paid in live mode. Superpay sets them per mode, so an account type you paid in test mode is not necessarily paid in live mode, and a verified beneficiary does not prove it. Ask Superpay before your first live payout. A payout to an account type that cannot be paid fails with
failure.codeBENEFICIARY_NOT_PAYABLEstraight after it is created, with nothing held. See Account types that can be paid. - Do not send UPI IDs yet. Payouts to UPI IDs work in test mode only. In live mode a beneficiary with
account.typeIN_UPIis refused with422INSTRUMENT_NOT_AVAILABLE, so pay bank accounts in live mode until Superpay tells you UPI is enabled there. See UPI payouts. - Create your webhook subscriptions again. Test subscriptions are not sent live events. Live URLs must use
https. See Webhooks.
Events and webhooks#
- Subscribe an endpoint with
POST /v1/webhook-subscriptions, and store itssecretfrom the response. - Verify every delivery on the raw body before you parse it. A stock Standard Webhooks library does it. See Verify the signature.
- Answer fast. Any
2xx, with headers within 10 seconds. Store the event, answer, then process. - Deduplicate and order. Deduplicate on
Webhook-Id. Order one object's events byresource.version. - Backfill. Keep a watermark and walk
GET /v1/eventsforward from it, so a delivery your endpoint missed is still processed. See Keep up without gaps. - Watch the subscription's
health, and listen forwebhook_subscription.disabledon a second endpoint.
Asynchronous states#
A 201 means Superpay accepted the request, not that the work is done. Your balance is not checked when a payout is created: everything that involves your balance, Superpay's partners or the beneficiary's bank happens after the response. Accepting a conversion reads your custody wallets first, but the pull and the conversion happen after it.
| Waiting for | Event | Or poll | Done when |
|---|---|---|---|
| Business verification | business.verification_updated | GET /v1/business-verification | status is ACTIVE. REJECTED needs you |
| Originator | originator.verified | GET /v1/originators/{id} | verification.payable is true |
| Beneficiary | beneficiary.verified | GET /v1/beneficiaries/{id} | payouts_enabled and verification.payable are true. verification.status REQUIREMENTS_DUE needs you |
| Conversion | fx.executed, fx.failed | GET /v1/conversions/{id} | status is EXECUTED or FAILED |
| Payout | payout.completed, payout.failed, … | GET /v1/payouts/{id} | status is COMPLETED, FAILED, CANCELLED or REVERSED |
- Poll with backoff if you poll. Start at a few seconds. Back off to a minute or more for payouts still with the bank.
- Poll lists for volume. Use
GET /v1/payouts?status=SUBMITTED(or any other status) instead of one request per payout. - Handle every final status, including
CANCELLEDandREVERSED. - Cancellation is a request.
POST /v1/payouts/{id}/cancelstops a payout only before it is sent to the banking partner. After that, the payout continues to its normal outcome. Readstatusafterwards. - A payout waiting in
FUNDS_RESERVEDhas no banking partner that can take it yet. It waits with no time limit. Cancel it to release the funds, or contact Superpay.
UNKNOWN is not FAILED#
Never replace an UNKNOWN payout
UNKNOWN means Superpay could not yet confirm whether the banking partner accepted the instruction. The money may still reach the beneficiary. Your funds stay reserved while Superpay confirms the outcome. The payout then moves on, and ends in COMPLETED or FAILED. A second payout for the same obligation can pay the beneficiary twice.
- Show
UNKNOWNas in progress to your users, not as failed. - Keep waiting, patiently. Resolution can take days in rare cases. Contact Superpay if it lasts longer than you can wait.
- Same rule for conversions. A conversion in
UNKNOWNkeeps its funds reserved. Do not accept another quote for the same conversion.
COMPLETED can become REVERSED#
- Watch recent completions. If the beneficiary's bank returns the money, a
COMPLETEDpayout becomesREVERSEDwithfailure.codePROVIDER_RETURNED, announced bypayout.reversed. Theamountis credited back to your available INR balance. Thefeeis not. - Returns can arrive days after completion. Keep listening, or re-check recently completed payouts for several days.
Failed payouts#
- Branch on
failure.code.failure.reasonis human-readable text that can change. Do not parse it. Treat a code you do not recognise as a generic failure. - Create a new payout to try again, with a new
referenceand a newIdempotency-Key. A failed payout is never retried. Any funds it held are back in your available balance.
failure.code | Status | What you do |
|---|---|---|
INSUFFICIENT_FUNDS | FAILED | Convert more to INR, then create a new payout |
ORIGINATOR_NOT_ACTIVE | FAILED | If the originator is PENDING, supply what its verification lists or wait, then create a new payout. If it is REJECTED or SUSPENDED, see originator statuses. If failure.reason names missing fields, correct the originator with them first |
BENEFICIARY_NOT_PAYABLE | FAILED | The beneficiary changed after the payout was created, for example it was deleted, or it lacked a field the payout must carry: failure.reason then names it. Fix it or use another. Or its account type cannot be paid in live mode: do not resubmit to the same account, and see Account types that can be paid |
LIMIT_EXCEEDED | FAILED | The amount is under ₹1.00, or over a per-payout cap, where the route to the account has one. Create a new payout of at least ₹1.00, or ask Superpay what the cap is |
COMPLIANCE_REJECTED | FAILED | A party was rejected on sanctions screening. Contact Superpay. Do not resubmit |
PROVIDER_REJECTED | FAILED | The banking partner refused the instruction, or the route cannot take a party's address (over 128 characters) or the account holder's identity document (not a passport or a national ID). Check the payout and both parties, then create a new payout |
ACCOUNT_TYPE_REJECTED_BY_BANK | FAILED | The bank refused the credit for this account type. Create a new payout: it goes to a partner that may credit the account, or fails with BENEFICIARY_NOT_PAYABLE when none may in live mode. Contact Superpay if it fails with this code again |
RETRY_WINDOW_EXPIRED | FAILED | The payout could not be sent in time. Create a new payout |
PROVIDER_FAILED | FAILED | The payment failed at the bank. Create a new payout if appropriate |
PROVIDER_RETURNED | REVERSED | The beneficiary's bank returned the money. Confirm the account details with the beneficiary |
See Payout statuses and Failure codes.
Errors and retries#
- Branch on
code, and onsub_codewhere there is one. Errors under/v1areapplication/problem+jsonwith a stablecode.titleanddetailare for people and can change. The token endpoint returns OAuth errors instead: branch onerror. - Log
X-Request-Idfrom every response. Error bodies repeat it asrequest_id. You can send your ownX-Request-Id(letters, digits and_ . : -, up to 128 characters). Any other value is replaced without an error. - Send exact bodies. Unknown fields are rejected. Money amounts are integers in minor units, never floats or strings.
- Parse responses tolerantly. Ignore fields you don't recognise. Most objects leave out empty fields; webhook subscriptions and deliveries send
null. - Back off with jitter and cap the number of attempts.
| Response | Retry | How |
|---|---|---|
| Timeout, dropped connection, no response | Yes | Same key, same body. A retry never creates a duplicate, though a retried quote may be priced again |
5xx | Yes | Same key, same body, with backoff |
503 or 429 | Yes | Wait Retry-After seconds, then retry with the same key |
409 RESOURCE_LOCKED, 409 IDEMPOTENCY_LEASE_LOST | Yes | Same key, after a short wait |
401 INVALID_TOKEN | Once | Fetch a new token first |
401 UNAUTHENTICATED | No | Send Authorization: Bearer <access_token> |
403 INSUFFICIENT_SCOPE | No | Request a token with the scope, or ask Superpay to grant it |
403 TENANT_NOT_ACTIVE | No | Your account is not active. Contact Superpay. A new token does not help |
Any other 400, 404, 409, 410 or 422 | No | Fix the cause. Send again with a new key |
Some error bodies also carry "retryable": true: retrying the same request can succeed. See When to retry.
Reconciliation#
- Set
referenceon every payout to your own identifier, up to 128 bytes. It must be unique across all your payouts in a mode, including failed and cancelled ones. A duplicate returns409 REFERENCE_EXISTS. - Store the payout
idnext to your record as soon as the201arrives. You cannot look a payout up byreference. - Lost the response? Retry with the same
Idempotency-Keyto get the payout back. If you no longer have the key and a new attempt returns409 REFERENCE_EXISTS, list payouts filtered bybeneficiary_idand match onreference. - Match on
id,reference,amount,fee,tax_withheld,status,failure.code,bank_referenceandcompleted_at. - Trace money with
bank_reference. It is the reference from the beneficiary's banking network (typically the UTR), present once known. It can be missing, even on a completed payout. Do not validate its format. - Account for
tax_withheld. When tax is withheld at source, the beneficiary receivesamountminustax_withheld. What leaves your balance is stillamountplusfee. - Detect changes from
status, notupdated_at.updated_atcan change whilestatusdoes not. - Read
completed_atas "reached a final status". It is also set onFAILED,CANCELLEDandREVERSEDpayouts. On aREVERSEDpayout it is the time of the return, not of the original completion. - Sweep daily. Page through your payouts and compare them with your own ledger. Include recently completed payouts, to catch returns.
/v1/payoutspayouts:readLists are newest first. While has_next is true, pass the last id on the page as starting_after.
curl -G https://api.withsuperpay.com/v1/payouts \
-H "Authorization: Bearer $SUPERPAY_TOKEN" \
-d limit=100 \
-d beneficiary_id=ben_01M2FPNHGGT6JC9PXS2HM4VA7E{
"object": "list",
"data": [
{
"object": "payout",
"id": "po_01M2FPYTCG5WNE8KQ3RZ7DXB2H",
"originator_id": "org_01M2FPKH20QX7RB3N8D5K2WZ4M",
"beneficiary_id": "ben_01M2FPNHGGT6JC9PXS2HM4VA7E",
"corridor": "IN-INR-BANK",
"amount": { "amount": 5000000, "currency": "INR" },
"fee": { "amount": 12500, "currency": "INR" },
"status": "COMPLETED",
"compliance_status": "APPROVED",
"provider_status": "COMPLETED",
"ledger_status": "POSTED",
"settlement_status": "NOT_SETTLED",
"reconciliation_status": "NOT_RECONCILED",
"purpose_code": "P1301",
"purpose_description": "Family maintenance",
"reference": "INV-2026-0042",
"bank_reference": "425714839201",
"rail": "IMPS",
"livemode": true,
"created_at": "2026-09-30T10:21:14Z",
"updated_at": "2026-09-30T10:21:52Z",
"submitted_at": "2026-09-30T10:21:16Z",
"completed_at": "2026-09-30T10:21:52Z"
}
],
"has_next": false
}Contact Superpay#
Talk to Superpay about anything the API cannot do for you.
| Situation | Ask for |
|---|---|
| New credential, rotation, or a lost or exposed secret | A new credential, and revocation of the old one |
400 invalid_scope, or 403 INSUFFICIENT_SCOPE on a token with every scope you hold | The scope granted to your credential |
403 TENANT_NOT_ACTIVE | The status of your account |
| The custody partner's end-user agreement and its version | The agreement your business must accept before business verification |
A business verification REJECTED and not correctable, or a document request marked document.other | A review, or what is needed |
A deposit that does not show in your wallet's balance, or coins sent on the wrong network | A review of the deposit |
| USD left in your balance after a failed conversion that you want back in custody | Its return |
An originator or beneficiary REJECTED or MISMATCH that is not correctable and that you believe is right | A review of the party |
A payout in UNKNOWN, waiting in FUNDS_RESERVED, or still in progress for longer than expected | The outcome of the payout |
The account types your live payouts can reach, or a payout to a verified beneficiary that failed with BENEFICIARY_NOT_PAYABLE without naming a missing field | The account types that can be paid in your live mode |
Include in every request:
- The
request_idof the failing call, or itsX-Request-Idheader - The object ID (
po_…,ben_…,org_…,fxo_…,cus_…) and yourreference livemode- The time of the call, in UTC
- The error
codeandsub_code, or the object'sstatusand failure code
Never send a client secret, an access token or a webhook signing secret to anyone, including Superpay.