Quickstart

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, and jq to read values out of responses.
Shell
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#

POST/oauth2/token

Exchange your credentials for a short-lived bearer token.

Shell
curl https://api.withsuperpay.com/oauth2/token \
  -u "$SUPERPAY_CLIENT_ID:$SUPERPAY_CLIENT_SECRET" \
  -d grant_type=client_credentials

Save the token:

Shell
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#

POST/v1/business-verificationtreasury:manage

Once 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.

Shell
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"
  }'

Every field is described in Business verification. Wait until status is ACTIVE:

GET/v1/business-verificationtreasury:read
Shell
curl https://api.withsuperpay.com/v1/business-verification \
  -H "Authorization: Bearer $SUPERPAY_TOKEN"
statusMeaningWhat you do
PENDINGBeing verified.Check again in a few minutes.
REQUIREMENTS_DUEDocuments are needed: requirements_due lists them.Upload each one, then keep checking.
ACTIVEVerified. conversions_enabled is true.Continue.
REJECTEDNot verified.If capabilities[0].correctable is true, correct and resubmit. Otherwise contact Superpay.

3. Deposit stablecoins#

GET/v1/custodytreasury:read

Once your business verification is ACTIVE, your custody account lists a deposit wallet per asset and network.

Shell
curl https://api.withsuperpay.com/v1/custody \
  -H "Authorization: Bearer $SUPERPAY_TOKEN"

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#

POST/v1/originatorsoriginators:write

The 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.

Shell
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"
  }'
Shell
export ORIGINATOR_ID=org_01M2FPKH20W4N5X6M3P9R2T1VA   # the id from your response

Check 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.

GET/v1/originators/{id}originators:read
Shell
curl https://api.withsuperpay.com/v1/originators/$ORIGINATOR_ID \
  -H "Authorization: Bearer $SUPERPAY_TOKEN" | jq '{status, verification: .verification | {status, payable, reason_code, requirements_due}}'
verification.statusMeaningWhat you do
ACTIVE, with payable: trueReady.Continue.
REQUIREMENTS_DUESomething is missing: requirements_due says what, for example email.Correct the originator or upload a document.
PENDINGA check by Superpay is outstanding.Keep polling.
REJECTED, SUSPENDEDCannot send payouts. reason_code says why.See Rejected originators.

5. Add a beneficiary#

POST/v1/originators/{id}/beneficiariesbeneficiaries:write

The 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.

Shell
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"
  }'
Shell
export BENEFICIARY_ID=ben_01M2FPNHGG6C8D0F2H4K6M8P0R   # the id from your response

Only 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.

GET/v1/beneficiaries/{id}beneficiaries:read
Shell
curl 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 seeMeaningWhat you do
requirements_due lists fieldsThe 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: PENDINGVerification in progress.Keep polling.
payouts_enabled: trueACTIVE and VERIFIED.Continue.
verification_status: MISMATCHThe bank holds a different name.See Name matching.
status: REJECTEDThe 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#

POST/v1/conversions/quotesfx:quote

Price 1,000.00 USD in INR.

Shell
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" }
  }'

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.

Shell
export QUOTE_ID=fxq_01M2FPWJ40B1MVJFJRHGFWTP27   # the id from your response

Accept it#

POST/v1/conversionsfx:execute

A 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.

Shell
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\" }"
Shell
export CONVERSION_ID=fxo_01M2FPY3K8D5N2Q7R9S4T6V8WX   # the id from your response

Accepting 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#

GET/v1/conversions/{id}fx:read
Shell
curl https://api.withsuperpay.com/v1/conversions/$CONVERSION_ID \
  -H "Authorization: Bearer $SUPERPAY_TOKEN"
200 OK
{
  "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"
}
statusMeaningWhat you do
CREATEDSuperpay is pulling the dollars from your custody wallet.Keep polling.
EXECUTINGThe dollars are held in your balance and the conversion is in progress.Keep polling.
UNKNOWNThe outcome is not confirmed yet. Superpay keeps checking.Keep polling. Do not create a new conversion.
EXECUTEDDone. buy is in your INR available balance.Continue.
FAILEDNot converted. failure_reason says why.See Failure reasons, then get a new quote.

Once executed, confirm the INR arrived:

GET/v1/balancesbalances:read
Shell
curl "https://api.withsuperpay.com/v1/balances?currency=INR" \
  -H "Authorization: Bearer $SUPERPAY_TOKEN"
200 OK
{
  "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#

POST/v1/payoutspayouts:write

Pay ₹50,000.00 to the beneficiary.

Shell
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\"
  }"
Shell
export PAYOUT_ID=po_01M2FPYTCG9B1D3F5H7K9M1P3R   # the id from your response
  • amount is in paise: 5000000 is ₹50,000.00. It must be INR.
  • fee is set when the payout is created and charged on top of amount. Your INR available balance must cover both. The balance is checked in the background, not in this request: a shortfall ends the payout as FAILED with failure.code INSUFFICIENT_FUNDS.
  • reference is optional: your own ID for the payout. It must be unique across your payouts. Reusing one returns 409 REFERENCE_EXISTS.
  • Build on status. The other *_status fields are informational: settlement_status, for example, is NOT_SETTLED even 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:

CodeHTTPWhenWhat you do
BENEFICIARY_NOT_FOUND422No beneficiary with this beneficiary_id exists in this mode.Check the ID.
BENEFICIARY_NOT_PAYABLE422payouts_enabled is not true. sub_code says why.Finish step 5, then retry with a new key.
BENEFICIARY_ORIGINATOR_MISMATCH422The beneficiary belongs to a different originator.Send the originator the beneficiary was added under.
CURRENCY_MISMATCH422amount.currency is not INR.Send INR.
REFERENCE_EXISTS409reference is already used by another payout.Use a new reference.

See Payout errors and Idempotency errors.

8. Follow it to the end#

GET/v1/payouts/{id}payouts:read

The 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_PENDINGCOMPLETED
Shell
curl https://api.withsuperpay.com/v1/payouts/$PAYOUT_ID \
  -H "Authorization: Bearer $SUPERPAY_TOKEN"

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.

statusMeaningWhat you do
CREATED to PROVIDER_PENDINGIn 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.
COMPLETEDThe 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.
FAILEDNot 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.
CANCELLEDCancelled before it was sent. Any held funds are released.Nothing.
UNKNOWNThe 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.

Next steps#