Balances

Balances

Your INR and USD balances at Superpay, how much INR you can pay out now, and the retired stablecoin fundings.

Your balance at Superpay holds the INR your conversions produce and your payouts spend. Your stablecoins are not part of it: they wait in your custody account until a conversion needs them.

EndpointScopeUse
GET /v1/balancesbalances:readWhat you hold, per currency
GET /v1/treasury/capacitytreasury:readHow much INR you can pay out now, and whether Indian banking hours are open
GET /v1/treasury/fundingstreasury:readYour earlier stablecoin fundings
GET /v1/treasury/fundings/{id}treasury:readOne earlier stablecoin funding
POST /v1/treasury/fundingstreasury:manageRetired. Announcing a USDC or USDT funding returns 410 FUNDING_DEPRECATED

Retrieve balances#

GET/v1/balancesbalances:read

Returns one balance per currency you hold:

CurrencyWhere it comes from
INRConversions credit it. Payouts spend it
USDCredited from your custody account for a conversion, and spent by it straight away. Usually 0. It appears after your first conversion funded from custody
currencystring

Query parameter. Return only this currency, e.g. INR. Upper case, 3–5 letters. A currency you have never held returns an empty data array.

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

Amounts are integers in minor units: INR and USD both have 2 decimals. Above, 3295750 is ₹32,957.50, and the reserved 5012500 is a ₹50,000.00 payout plus its ₹125.00 fee, not yet completed.

Only booked money appears. Stablecoins in your custody account never do: read them with GET /v1/custody.

The balance object#

FieldTypeDescription
objectstringbalance
currencystringINR or USD
availablemoneyYours to use now: to convert or to pay out
reservedmoneyHeld for work in flight: conversions not yet executed and payouts not yet completed
pendingmoneyReserved for future use. Always 0 today
livemodebooleantrue for live credentials, false for test
  • Items are sorted by currency code.
  • The list is not paginated. has_next is always false.
  • An account with no credited funds returns "data": [].
  • Test and live balances are separate.

What moves your balance#

EventEffect
A conversion funded from custody startsThe USD pulled from your custody account is credited, and the conversion's sell moves from USD available to reserved
The conversion executesThe USD leaves reserved. The INR buy is added to available
The conversion fails after its USD was reservedThe USD returns to available, and your next USD conversion spends it first
A payout reaches FUNDS_RESERVEDThe amount plus fee moves from available to reserved in INR
The payout completesThe amount plus fee leaves reserved
The payout fails or is cancelled after its funds were reservedThe amount plus fee returns to available
The beneficiary's bank returns a completed payoutThe amount returns to available. The fee is not returned

Step-by-step figures: Conversions: effect on balances and Payouts: your balance.

Payout capacity#

GET/v1/treasury/capacitytreasury:read

How much INR you can pay out right now, and whether Indian banking hours are open. Check it before a large payout.

corridorstring

Query parameter. Defaults to IN-INR-BANK, payouts to Indian bank accounts. IN-NRE, its earlier name, is accepted too. Omit it.

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

The capacity object#

FieldTypeDescription
objectstringtreasury_capacity
corridorstringIN-INR-BANK, whichever name you sent
funding_modelstringTENANT_PREFUND: payouts are paid from your own INR balance
capacitymoneyINR you can pay out now. Never more than tenant_available and never negative. Can be lower than tenant_available when payout liquidity is constrained
tenant_availablemoneyYour available INR balance. USD and your custody holdings are not counted: convert first
livemodebooleantrue for live credentials
banking_windowobjectIndian banking hours. See Banking window
as_ofstringUTC time the figures were computed

Capacity is a snapshot at as_of, not a hold on funds.

Banking window#

FieldTypeDescription
openbooleantrue during banking hours on a business day
next_openstringOptional. When banking hours next open
next_cutoffstringOptional. When banking hours next close
zonestringAsia/Kolkata
  • Banking hours are 09:30–16:30 IST, Monday to Friday, unless Superpay's banking calendar marks the day otherwise.
  • While open, next_cutoff is today's 16:30 and next_open is the next business day's 09:30.
  • While closed, both refer to the next opening: today's if it is a business day before 09:30, otherwise the next business day's.
  • next_open and next_cutoff carry the +05:30 offset. Every other timestamp in the API is UTC.

Stablecoin fundings#

Stablecoin balances are no longer held at Superpay. You used to announce a USDC or USDT deposit with POST /v1/treasury/fundings and hold the stablecoins in your balance. Now you deposit them into your custody account, where they stay until a conversion needs them.

POST/v1/treasury/fundingstreasury:manage

Announcing a USDC or USDT funding returns 410 Gone with code FUNDING_DEPRECATED. The Idempotency-Key and the JSON body are checked first; the other fields are not. Any other asset fails validation with 400 INVALID_ARGUMENT. Unlike other problem documents, the 410's title is gone and it has no instance. The refusal is stored against its Idempotency-Key like any 4xx.

Your earlier fundings can still be read:

GET/v1/treasury/fundingstreasury:read
GET/v1/treasury/fundings/{id}treasury:read

The list is newest first. It takes limit (1 to 100, default 10) and starting_after (a tf_… id), and no filters. An unknown or malformed id, or one from the other mode, returns 404 FUNDING_NOT_FOUND.

FieldTypeDescription
objectstringtreasury_funding
idstringtf_…
corridorstringIN-NRE or IN-INR-BANK
statusstringANNOUNCED, DETECTED, CONFIRMED, CREDITED (final), RETURNED (final, nothing credited) or UNKNOWN
amountmoneyThe amount announced, in the funding asset
credited_amountmoneyOptional. The amount credited, when one is recorded. It can differ from amount
networkstringethereum, polygon or tron
deposit_address, deposit_memostringOptional. Where the deposit was to be sent
external_referencestringOptional. The on-chain transaction hash
confirmations, required_confirmationsintegerNetwork confirmations seen, and needed
referencestringOptional. Your reference
livemodebooleantrue for live credentials
created_at, updated_atstringUTC

A funding announced earlier still moves to its final status. Its moves to DETECTED, CONFIRMED, CREDITED and RETURNED are announced by treasury.funding_* events. Contact Superpay about any stablecoin balance you still hold.

Errors#

Errors are problem documents. Key your handling on the HTTP status and code. Every endpoint here can also return the authentication errors on Errors.

CodeHTTPEndpointWhenWhat to do
INVALID_ARGUMENT400Balances, fundings listcurrency is not an upper-case 3–5 letter code, or limit is not 1 to 100. errors[].field names the parameterFix the parameter
CORRIDOR_UNKNOWN400Capacitycorridor is neither IN-INR-BANK nor IN-NREOmit corridor
FUNDING_NOT_FOUND404Retrieve a fundingNo funding with this id for your credentials' modeCheck the id and mode
FUNDING_DEPRECATED410Announce a fundingStablecoin fundings are retiredDeposit into custody
(varies)503Balances, capacityYour balance could not be read. retryable is trueRetry after Retry-After
(varies)504Balances, capacityReading your balance timed outRetry
INTERNAL500AnyUnexpected errorRetry later. Quote request_id to Superpay if it persists

Handle 503 and 504 by status. Their code values are not stable.