Funding
How a sandbox tenant gets simulated money to spend. A chain confirmation is not a credit; only a ledger write makes one.
What these routes are
Sandbox only: 403 sandbox_only in live mode
This endpoint models a balance held by Parity, which a live operator does not have. It exists so an integration can be learned against simulated money.
In production you own your customers' cash ledger. Parity returns the exact amounts to apply against it (operatorMoney, operatorExitMoney, settlementCredit) and never holds a player's funds. Do not build the live integration on this endpoint.
All three funding routes answer 403 sandbox_only for a live operator. A live integration funds its customers on its own books and applies the amounts Parity returns on quotes, orders and settlements.
The treasury these routes fund is configured for your account as part of your custody arrangement. What that model implies is on Bridge.
The deposit lifecycle
created → awaiting_funds → detected → bridging → credited
↘ ↘ ↘
╰─────────┴─────────┴──→ failed| Status | What it means |
|---|---|
created | A route was validated and a deposit row persisted. |
awaiting_funds | An address has been issued. Nothing has arrived. |
detected | A transaction exists on the source chain. |
bridging | The transfer is progressing toward collateral. Includes the upstream’s own “completed”. |
credited | A ledger entry was written. This, and only this, means the player has the money. |
failed | Terminal. No credit was made. |
Swipe the table sideways for more columns.
A deposit never moves backwards. Legal transitions are enforced in code, and credited and failed are both terminal.
A confirmation is not a credit
detected and bridging describe the blockchain: a transaction exists and is progressing. They say nothing about whose balance the money belongs to.
credited is the separate decision that the money belongs to a player, and it is written with the ledger entry in the same transaction. When the upstream reports success it only sets eligibleToCredit, so a retried success report cannot pay twice.
The two guards against a double credit
- The source transaction hash is unique. One on-chain transaction funds one deposit, ever.
- The ledger entry's idempotency key is derived from the deposit id, so a second credit attempt collides with the ledger's own uniqueness index.
Supported assets
symbol, chainId or comma-separated symbols narrow the list.The list is fetched live on every call, not cached, so a delisted route is never offered. An upstream outage returns 502 bridge_unavailable instead of a stale list.
Verified against the live bridge
When this was written the endpoint returned 229 live routes across 13 networks, including USDC, USDT, ETH and BTC.
All three funding endpoints require funding:write
Including the two reads. One scope, funding:write, covers every funding route, so provision keys accordingly.
{
"retrievedAt": "2026-08-20T17:04:11.902Z",
"count": 1,
"assets": [
{
"symbol": "USDC",
"name": "USD Coin",
"chainId": "137",
"network": "Polygon",
"tokenAddress": "0x…",
"decimals": 6,
"minimumUsd": 5,
"addressKind": "evm"
}
],
"symbols": ["USDC"],
"depositsEnabled": true
}depositsEnabledisfalsewhen no treasury is configured, anddepositsDisabledBecausethen lists what is missing. Check it before showing a deposit button: the asset list is still returned either way.minimumUsdis the route's own minimum, not ours. Below it a transfer will not bridge, and the funds are stranded rather than refunded.addressKindis one ofevm,svm,btc,tron, and tells you which deposit address shape the route is funded from.decimalsis required to render an amount. Base units are integers; a display amount is not.
Opening a deposit
201 on success.POST /api/v1/funding/deposit-address
Authorization: Bearer pk_test_...
X-Parity-User: your-own-player-id
{ "asset": "USDC", "chainId": "137" }{
"depositId": "…",
"userId": "your-own-player-id",
"status": "created",
"asset": "USDC",
"chainId": "137",
"network": "Polygon",
"depositAddress": "0x…",
"tokenAddress": "0x…",
"decimals": 6,
"minimumUsd": 5,
"addressKind": "evm",
"createdAt": "2026-08-20T17:04:12.115Z",
"pollUrl": "/api/v1/funding/deposits/…"
}The route is checked against the live catalogue before anything is stored, and the deposit row is written before an address is handed out, so every funded address has a record.
- This is the one funding call that creates a user: a deposit must name who it credits, so a first-time
X-Parity-Useris registered here. chainIdis accepted as a string or a number and is normalised to a string. It is an identifier, not an integer to do arithmetic on.- Follow
pollUrlrather than building the path yourself.
Refusals
| Status | Code | Meaning |
|---|---|---|
400 | missing_user | No X-Parity-User header. |
422 | route_not_supported | That asset and chain pair is not in the live catalogue. |
503 | funding_unavailable | No treasury destination is configured. Nothing can be funded. |
503 | no_address_for_chain | The route is valid but no address of the required kind was issued. |
502 | bridge_unavailable | The bridge could not be reached. Nothing was recorded: retry safely. |
Swipe the table sideways for more columns.
Following a deposit
{
"depositId": "…",
"status": "bridging",
"providerStatus": "SUBMITTED",
"eligibleToCredit": false,
"hold": null,
"asset": "USDC",
"chainId": "137",
"network": "Polygon",
"depositAddress": "0x…",
"minimumUsd": 5,
"sourceTxHash": "0x…",
"sourceAmountBaseUnit": "25000000",
"creditedAmount": null,
"ledgerEntryId": null,
"failureReason": null,
"timeline": {
"createdAt": "…", "awaitingFundsAt": "…", "detectedAt": "…",
"bridgingAt": "…", "creditedAt": null, "failedAt": null
},
"history": [
{ "from": "created", "to": "awaiting_funds", "at": "…" },
{ "from": "awaiting_funds", "to": "detected", "at": "…" }
]
}- The bridge is polled on every read unless you pass
?sync=false. A non-terminal deposit therefore refreshes itself; acreditedorfailedone never does. - If that poll fails, the call still returns
200with the stored lifecycle and asyncErrorfield, so a bridge outage does not make a deposit look lost. eligibleToCreditmeans the transfer has arrived and may now be credited. Onlystatus: "credited"with aledgerEntryIdis a credit.404 unknown_depositcovers both “no such deposit” and “not yours”, so error codes cannot reveal another partner's deposit ids.- Every transition is appended to
history, so a deposit's past can be inspected.
Show the player your status, not the upstream’s
providerStatus is recorded verbatim for diagnosis and is not a customer-facing string. Show status, and treat anything short of credited as money on its way, not arrived.