Quickstart
Send your first INR payout to an Indian bank account in test mode, end to end.
Eight steps, from an access token to a paid beneficiary. Every command runs as-is once you export the variables it uses. When a step exports an ID, use the one from your own response.
Before you start#
You need:
- Test credentials from Superpay: a client ID (
cli_…) and a client secret (sk_test_…). There is no self-serve signup; ask your Superpay contact. - Your business's details for its verification, including the version of the custody partner's end-user agreement your business accepted. Superpay gives you the agreement. You do not need these if your business is verified with the form.
- Test stablecoins to deposit. Ask your Superpay contact how to get USDC or USDT on a test network.
curl, andjqto read values out of responses.
export SUPERPAY_CLIENT_ID=cli_...
export SUPERPAY_CLIENT_SECRET=sk_test_...Test and live use the same host. The secret decides the mode: sk_test_ credentials only see test data, every object they return carries "livemode": false, and no real money moves. See Testing.
Idempotency keys
Most creates and other state-changing requests need an Idempotency-Key header (16–64 printable ASCII characters, no spaces). The examples use $(uuidgen) for brevity. In your code, generate the key once per operation and send the same key on every retry. A validation or business-rule error is stored against its key and replayed, so fix the request and use a new key. 409 RESOURCE_LOCKED means the first request with that key is still running: retry with the same key. See Idempotency.
1. Get an access token#
/oauth2/tokenExchange your credentials for a short-lived bearer token.
curl https://api.withsuperpay.com/oauth2/token \
-u "$SUPERPAY_CLIENT_ID:$SUPERPAY_CLIENT_SECRET" \
-d grant_type=client_credentials{
"access_token": "eyJhbGciOiJFUzI1NiIsImtpZCI6IjViZDc0ZmQ1MzUyOTExYzIiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOi...",
"expires_in": 300,
"livemode": false,
"scope": "originators:write originators:read beneficiaries:write beneficiaries:read fx:quote fx:execute fx:read balances:read payouts:write payouts:read treasury:manage treasury:read webhooks:manage events:read",
"token_type": "Bearer"
}Save the token:
export SUPERPAY_TOKEN=$(curl -s https://api.withsuperpay.com/oauth2/token \
-u "$SUPERPAY_CLIENT_ID:$SUPERPAY_CLIENT_SECRET" \
-d grant_type=client_credentials | jq -r .access_token)The token lasts expires_in seconds. There is no refresh token: when a call returns 401 INVALID_TOKEN, repeat this step. See Token lifetime.
2. Verify your business#
/v1/business-verificationtreasury:manageOnce per mode, your business is verified. This opens the custody account your conversions are funded from. Businesses registered in the United States can be verified, and businesses registered in Canada that are themselves regulated; the people who control and own them can live anywhere.
Verified with the form?
If Superpay told you your business is verified with its form, you have nothing to submit: skip the POST and go straight to GET /v1/business-verification below. It returns 404 BUSINESS_VERIFICATION_NOT_FOUND until your people have submitted the form, then PENDING, and ACTIVE once the review is done. In test mode the form takes only made-up tax numbers. See Verified with the form.
curl https://api.withsuperpay.com/v1/business-verification \
-H "Authorization: Bearer $SUPERPAY_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"legal_name": "Acme Remit Inc.",
"ein": "12-3456789",
"email": "compliance@acme.example",
"phone": "+14155550100",
"website": "https://acme.example",
"address": { "line1": "185 Berry St", "city": "San Francisco", "state": "CA", "postal_code": "94107", "country": "US" },
"controller": {
"first_name": "Maya",
"last_name": "Chen",
"date_of_birth": "1981-03-09",
"email": "maya@acme.example",
"phone": "+14155550101",
"address": { "line1": "12 Oak St", "city": "Oakland", "state": "CA", "postal_code": "94607", "country": "US" },
"ssn": "222-22-2222"
},
"terms_version": "2025-04-01",
"terms_accepted_at": "2026-09-30T08:55:00Z"
}'{
"object": "business_verification",
"id": "cus_01M2FN8Q4Z6B8D0F2H4K6M8P0R",
"status": "PENDING",
"reason_code": "KYC_PENDING",
"message": "The custodian is verifying the business; conversions are available once the account is ACTIVE.",
"requirements_due": [],
"capabilities": [
{
"capability": "custody",
"status": "PENDING",
"reason_code": "KYC_PENDING",
"message": "The custodian is verifying the business; conversions are available once the account is ACTIVE.",
"requirements_due": [],
"correctable": false
}
],
"conversions_enabled": false,
"livemode": false,
"created_at": "2026-09-30T09:00:04Z",
"updated_at": "2026-09-30T09:00:04Z"
}Every field is described in Business verification. Wait until status is ACTIVE:
/v1/business-verificationtreasury:readcurl https://api.withsuperpay.com/v1/business-verification \
-H "Authorization: Bearer $SUPERPAY_TOKEN"status | Meaning | What you do |
|---|---|---|
PENDING | Being verified. | Check again in a few minutes. |
REQUIREMENTS_DUE | Documents are needed: requirements_due lists them. | Upload each one, then keep checking. |
ACTIVE | Verified. conversions_enabled is true. | Continue. |
REJECTED | Not verified. | If capabilities[0].correctable is true, correct and resubmit. Otherwise contact Superpay. |
3. Deposit stablecoins#
/v1/custodytreasury:readOnce your business verification is ACTIVE, your custody account lists a deposit wallet per asset and network.
curl https://api.withsuperpay.com/v1/custody \
-H "Authorization: Bearer $SUPERPAY_TOKEN"{
"object": "custody_account",
"id": "cus_01M2FN8Q4Z6B8D0F2H4K6M8P0R",
"status": "ACTIVE",
"wallets": [
{
"asset": "USDC",
"network": "polygon",
"address": "0x8f3a2b61c47d9e05a1b3c5d7e9f1a2b4c6d8e0f1",
"balance": { "amount": 0, "currency": "USD" },
"observed_at": "2026-09-30T10:05:12Z"
}
],
"pulls": [],
"livemode": false
}Send test USDC to the polygon wallet's address. In test mode, polygon is the Amoy test network: never send real coins to a test-mode address. Retrieve the account again until the wallet's balance shows your deposit, in US dollars and cents: 12,500 USDC shows as {"amount": 1250000, "currency": "USD"}.
Your deposit stays in your custody account. It does not appear in GET /v1/balances until a conversion uses it. See Custody account.
4. Create an originator#
/v1/originatorsoriginators:writeThe originator is the person sending the money. With the details below, including an email, Superpay holds everything a payout needs of a sender, so the originator is ready as soon as it is created.
curl https://api.withsuperpay.com/v1/originators \
-H "Authorization: Bearer $SUPERPAY_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "Rajesh Raghunathan",
"email": "rajesh@example.com",
"date_of_birth": "1985-04-12",
"nationality": "IN",
"country_of_residence": "US",
"address": {
"line1": "185 Berry St",
"city": "San Francisco",
"state": "CA",
"postal_code": "94107",
"country": "US"
},
"id_document": {
"type": "PASSPORT",
"number": "Z1234567",
"issuing_country": "IN",
"expires_on": "2031-01-01"
},
"occupation": "Engineer",
"source_of_funds": "SALARY",
"reference": "CUS-8812"
}'{
"object": "originator",
"id": "org_01M2FPKH20W4N5X6M3P9R2T1VA",
"status": "ACTIVE",
"party_type": "INDIVIDUAL",
"name": "Rajesh Raghunathan",
"reference": "CUS-8812",
"verification": {
"status": "ACTIVE",
"payable": true,
"requirements_due": [],
"capabilities": [
{
"capability": "cross_border",
"status": "ACTIVE",
"requirements_due": [],
"correctable": false
}
]
},
"livemode": false,
"created_at": "2026-09-30T10:15:04Z",
"updated_at": "2026-09-30T10:15:04Z"
}export ORIGINATOR_ID=org_01M2FPKH20W4N5X6M3P9R2T1VA # the id from your responseCheck it is payable#
The create response above already shows status: ACTIVE and verification.payable: true. If yours does not, retrieve the originator and read its verification.
/v1/originators/{id}originators:readcurl https://api.withsuperpay.com/v1/originators/$ORIGINATOR_ID \
-H "Authorization: Bearer $SUPERPAY_TOKEN" | jq '{status, verification: .verification | {status, payable, reason_code, requirements_due}}'verification.status | Meaning | What you do |
|---|---|---|
ACTIVE, with payable: true | Ready. | Continue. |
REQUIREMENTS_DUE | Something is missing: requirements_due says what, for example email. | Correct the originator or upload a document. |
PENDING | A check by Superpay is outstanding. | Keep polling. |
REJECTED, SUSPENDED | Cannot send payouts. reason_code says why. | See Rejected originators. |
5. Add a beneficiary#
/v1/originators/{id}/beneficiariesbeneficiaries:writeThe beneficiary is the Indian bank account that receives the INR. Send the account number, the IFSC, the holder's name and the account type the holder declares (NRE, NRO or SAVINGS), with the account holder's identity: date of birth, nationality, address and identity document. A beneficiary without the account type or the identity is accepted, but it cannot be paid until you supply them.
curl https://api.withsuperpay.com/v1/originators/$ORIGINATOR_ID/beneficiaries \
-H "Authorization: Bearer $SUPERPAY_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"account": {
"type": "IN_BANK",
"account_number": "50100123456789",
"ifsc": "HDFC0000261",
"holder_name": "Anita Raghunathan",
"bank_account_type": "NRE",
"relationship": "SPOUSE"
},
"date_of_birth": "1990-01-31",
"nationality": "IN",
"address": {
"line1": "14 MG Road",
"city": "Bengaluru",
"state": "KA",
"postal_code": "560001",
"country": "IN"
},
"id_document": {
"type": "PASSPORT",
"number": "N7654321",
"issuing_country": "IN",
"expires_on": "2032-01-01"
},
"reference": "BEN-1"
}'{
"object": "beneficiary",
"id": "ben_01M2FPNHGG6C8D0F2H4K6M8P0R",
"originator_id": "org_01M2FPKH20W4N5X6M3P9R2T1VA",
"status": "PENDING",
"account": {
"type": "IN_BANK",
"account_number_last4": "6789",
"ifsc": "HDFC0000261",
"holder_name": "Anita Raghunathan",
"bank_account_type": "NRE",
"relationship": "SPOUSE"
},
"id_document": {
"type": "PASSPORT",
"number_last4": "4321",
"issuing_country": "IN",
"expires_on": "2032-01-01"
},
"account_type": { "resolved": "NRE", "confidence": "DECLARED", "source": "client" },
"verification_status": "PENDING",
"payouts_enabled": false,
"reference": "BEN-1",
"verification": {
"status": "PENDING",
"payable": false,
"reason_code": "KYC_PENDING",
"message": "Verification is still in progress; retry once the party is verified.",
"requirements_due": [],
"capabilities": [
{
"capability": "cross_border",
"status": "PENDING",
"reason_code": "KYC_PENDING",
"message": "Verification is still in progress; retry once the party is verified.",
"requirements_due": [],
"correctable": false
}
]
},
"livemode": false
}export BENEFICIARY_ID=ben_01M2FPNHGG6C8D0F2H4K6M8P0R # the id from your responseOnly the last four digits of the account number, and the last four characters of the document number, are ever returned.
verification.requirements_due is empty: nothing a payout needs is missing, so the account has gone to be verified.
Wait for payouts_enabled#
Superpay has the account verified, the holder's name included. Poll until payouts_enabled is true.
/v1/beneficiaries/{id}beneficiaries:readcurl https://api.withsuperpay.com/v1/beneficiaries/$BENEFICIARY_ID \
-H "Authorization: Bearer $SUPERPAY_TOKEN" | jq '{status, verification_status, payouts_enabled, requirements_due: .verification.requirements_due}'| You see | Meaning | What you do |
|---|---|---|
requirements_due lists fields | The account type or part of the holder's identity is missing. Nothing is verified until it is supplied. | Correct the beneficiary with them, then keep polling. |
verification_status: PENDING | Verification in progress. | Keep polling. |
payouts_enabled: true | ACTIVE and VERIFIED. | Continue. |
verification_status: MISMATCH | The bank holds a different name. | See Name matching. |
status: REJECTED | The account could not be verified. status_reason_code says why. | See Verification. |
A payout to a beneficiary that is not yet payable is refused with 422 BENEFICIARY_NOT_PAYABLE, and its sub_code says why. See payouts_enabled.
6. Convert to INR#
A conversion is a quote, then its acceptance. The dollars come from your custody account.
Get a quote#
/v1/conversions/quotesfx:quotePrice 1,000.00 USD in INR.
curl https://api.withsuperpay.com/v1/conversions/quotes \
-H "Authorization: Bearer $SUPERPAY_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"sell_currency": "USD",
"buy_currency": "INR",
"sell_amount": { "amount": 100000, "currency": "USD" }
}'{
"object": "fx_quote",
"id": "fxq_01M2FPWJ40B1MVJFJRHGFWTP27",
"status": "ACTIVE",
"sell": { "amount": 100000, "currency": "USD" },
"buy": { "amount": 8308250, "currency": "INR" },
"rate": { "value": "83.08250000", "base": "USD", "quote": "INR" },
"spread": { "amount": 500, "currency": "USD" },
"spread_bps": 50,
"origin": "API",
"expires_at": "2026-09-30T10:21:00Z",
"livemode": false,
"created_at": "2026-09-30T10:20:00Z"
}You sell 1,000.00 USD and receive ₹83,082.50. sell includes Superpay's spread of 5.00 USD (spread_bps of sell), and rate.value is buy divided by sell, so it already includes the spread. See How a quote is priced.
export QUOTE_ID=fxq_01M2FPWJ40B1MVJFJRHGFWTP27 # the id from your responseAccept it#
/v1/conversionsfx:executeA quote is valid for at most 60 seconds. Accept it before expires_at, or you get 422 QUOTE_EXPIRED and need a new quote. See Quote expiry.
curl https://api.withsuperpay.com/v1/conversions \
-H "Authorization: Bearer $SUPERPAY_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d "{ \"quote_id\": \"$QUOTE_ID\" }"{
"object": "fx_order",
"id": "fxo_01M2FPY3K8D5N2Q7R9S4T6V8WX",
"quote_id": "fxq_01M2FPWJ40B1MVJFJRHGFWTP27",
"status": "CREATED",
"sell": { "amount": 100000, "currency": "USD" },
"buy": { "amount": 8308250, "currency": "INR" },
"spread": { "amount": 500, "currency": "USD" },
"livemode": false,
"created_at": "2026-09-30T10:20:50Z"
}export CONVERSION_ID=fxo_01M2FPY3K8D5N2Q7R9S4T6V8WX # the id from your responseAccepting checks that one of your custody wallets holds the 1,000.00 USD. If none does, you get 422 CUSTODY_BALANCE_INSUFFICIENT and nothing is created. See Custody errors.
Wait for EXECUTED#
/v1/conversions/{id}fx:readcurl https://api.withsuperpay.com/v1/conversions/$CONVERSION_ID \
-H "Authorization: Bearer $SUPERPAY_TOKEN"{
"object": "fx_order",
"id": "fxo_01M2FPY3K8D5N2Q7R9S4T6V8WX",
"quote_id": "fxq_01M2FPWJ40B1MVJFJRHGFWTP27",
"status": "EXECUTED",
"sell": { "amount": 100000, "currency": "USD" },
"buy": { "amount": 8308250, "currency": "INR" },
"spread": { "amount": 500, "currency": "USD" },
"livemode": false,
"created_at": "2026-09-30T10:20:50Z",
"executed_at": "2026-09-30T10:20:58Z"
}status | Meaning | What you do |
|---|---|---|
CREATED | Superpay is pulling the dollars from your custody wallet. | Keep polling. |
EXECUTING | The dollars are held in your balance and the conversion is in progress. | Keep polling. |
UNKNOWN | The outcome is not confirmed yet. Superpay keeps checking. | Keep polling. Do not create a new conversion. |
EXECUTED | Done. buy is in your INR available balance. | Continue. |
FAILED | Not converted. failure_reason says why. | See Failure reasons, then get a new quote. |
Once executed, confirm the INR arrived:
/v1/balancesbalances:readcurl "https://api.withsuperpay.com/v1/balances?currency=INR" \
-H "Authorization: Bearer $SUPERPAY_TOKEN"{
"data": [
{
"object": "balance",
"currency": "INR",
"available": { "amount": 8308250, "currency": "INR" },
"reserved": { "amount": 0, "currency": "INR" },
"pending": { "amount": 0, "currency": "INR" },
"livemode": false
}
],
"has_next": false,
"object": "list"
}See Effect on balances and Retrieve balances.
7. Create the payout#
/v1/payoutspayouts:writePay ₹50,000.00 to the beneficiary.
curl https://api.withsuperpay.com/v1/payouts \
-H "Authorization: Bearer $SUPERPAY_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d "{
\"originator_id\": \"$ORIGINATOR_ID\",
\"beneficiary_id\": \"$BENEFICIARY_ID\",
\"amount\": { \"amount\": 5000000, \"currency\": \"INR\" },
\"purpose_code\": \"P1301\",
\"purpose_description\": \"Family maintenance\",
\"reference\": \"INV-2026-0042\"
}"{
"object": "payout",
"id": "po_01M2FPYTCG9B1D3F5H7K9M1P3R",
"originator_id": "org_01M2FPKH20W4N5X6M3P9R2T1VA",
"beneficiary_id": "ben_01M2FPNHGG6C8D0F2H4K6M8P0R",
"corridor": "IN-INR-BANK",
"amount": { "amount": 5000000, "currency": "INR" },
"fee": { "amount": 12500, "currency": "INR" },
"status": "CREATED",
"compliance_status": "PENDING",
"provider_status": "NOT_SUBMITTED",
"ledger_status": "NONE",
"settlement_status": "NOT_SETTLED",
"reconciliation_status": "NOT_RECONCILED",
"purpose_code": "P1301",
"purpose_description": "Family maintenance",
"reference": "INV-2026-0042",
"livemode": false,
"created_at": "2026-09-30T10:21:14Z",
"updated_at": "2026-09-30T10:21:14Z"
}export PAYOUT_ID=po_01M2FPYTCG9B1D3F5H7K9M1P3R # the id from your responseamountis in paise:5000000is ₹50,000.00. It must be INR.feeis set when the payout is created and charged on top ofamount. Your INRavailablebalance must cover both. The balance is checked in the background, not in this request: a shortfall ends the payout asFAILEDwithfailure.codeINSUFFICIENT_FUNDS.referenceis optional: your own ID for the payout. It must be unique across your payouts. Reusing one returns409 REFERENCE_EXISTS.- Build on
status. The other*_statusfields are informational:settlement_status, for example, isNOT_SETTLEDeven on a completed payout. See Detail statuses.
The beneficiary, the currency and the reference are checked when you create the payout. The most common refusals:
| Code | HTTP | When | What you do |
|---|---|---|---|
BENEFICIARY_NOT_FOUND | 422 | No beneficiary with this beneficiary_id exists in this mode. | Check the ID. |
BENEFICIARY_NOT_PAYABLE | 422 | payouts_enabled is not true. sub_code says why. | Finish step 5, then retry with a new key. |
BENEFICIARY_ORIGINATOR_MISMATCH | 422 | The beneficiary belongs to a different originator. | Send the originator the beneficiary was added under. |
CURRENCY_MISMATCH | 422 | amount.currency is not INR. | Send INR. |
REFERENCE_EXISTS | 409 | reference is already used by another payout. | Use a new reference. |
See Payout errors and Idempotency errors.
8. Follow it to the end#
/v1/payouts/{id}payouts:readThe payout runs in the background. In production, have Superpay tell you with a webhook subscribed to payout.*. Here, poll. A successful payout moves forward through these statuses and may skip some:
CREATEDVALIDATINGAPPROVEDFUNDS_RESERVEDSUBMISSION_PENDINGSUBMITTEDPROVIDER_PENDINGCOMPLETEDcurl https://api.withsuperpay.com/v1/payouts/$PAYOUT_ID \
-H "Authorization: Bearer $SUPERPAY_TOKEN"while true; do
# A payout's status is a word; an error's status is its HTTP status code.
STATUS=$(curl -s https://api.withsuperpay.com/v1/payouts/$PAYOUT_ID \
-H "Authorization: Bearer $SUPERPAY_TOKEN" | jq -r .status)
echo "$(date -u +%H:%M:%S) $STATUS"
case "$STATUS" in
COMPLETED|FAILED|CANCELLED|REVERSED) break ;;
401) echo "Token expired: repeat step 1, then run this loop again"; break ;;
4??) echo "Request refused: check PAYOUT_ID and your token's scopes"; break ;;
esac
sleep 5
done{
"object": "payout",
"id": "po_01M2FPYTCG9B1D3F5H7K9M1P3R",
"originator_id": "org_01M2FPKH20W4N5X6M3P9R2T1VA",
"beneficiary_id": "ben_01M2FPNHGG6C8D0F2H4K6M8P0R",
"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": false,
"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"
}A token lasts only expires_in seconds, so a long wait can outlive it. The loop stops on 401: repeat step 1 and run it again.
status | Meaning | What you do |
|---|---|---|
CREATED to PROVIDER_PENDING | In progress. From FUNDS_RESERVED on, amount + fee are held from your balance. A payout no banking partner can take yet waits in FUNDS_RESERVED. | Keep polling. |
COMPLETED | The beneficiary's bank credited the account. bank_reference is the bank transfer reference (UTR). | Share bank_reference with the beneficiary if they need to trace the credit. |
FAILED | Not paid. failure.code says why, for example INSUFFICIENT_FUNDS. Any held funds return to your available balance. | Fix the cause, then create a new payout with a new reference and a new key. |
CANCELLED | Cancelled before it was sent. Any held funds are released. | Nothing. |
UNKNOWN | The outcome is not confirmed yet. Funds stay held while Superpay keeps checking. This can take days. | Keep polling. Never create a replacement payout. |
Every status is described in Payout statuses, and every failure.code in Failure codes.
COMPLETED is not always final
If the beneficiary's bank returns the money after crediting it, the payout moves to REVERSED with failure.code PROVIDER_RETURNED, and the amount is credited back to your available balance. The fee is not returned. Keep listening for payout.reversed, or check completed payouts for a few days, if you reconcile against them.
That's it: your first beneficiary is paid.