Quickstart
Take your first crypto deposit and payout in an afternoon. This walks the whole loop: create an account → get an API key → issue a deposit address → get paid → pay out.
All calls use your tenant API key in the x-api-key header. Amounts are always
strings in base units (wei, satoshis, token minor units) so nothing ever
touches a float.
1. Create your account
Sign up in the console — it provisions your tenant and a segregated hot wallet per chain automatically:
👉 Create an account · already have one? Sign in
2. Get an API key
In the console, open API keys and create one. Copy it now — the secret is shown only once.
export CHAINRAIL_KEY="crq_..."
export CHAINRAIL_API="https://tenant-api.chainrail.io"
3. See which chains are enabled
The chains endpoint is public and returns everything configured on the deployment:
curl "$CHAINRAIL_API/v1/chains"
4. Issue a deposit address
One call per customer and chain. Pass remoteCustomerId to make it idempotent —
the same customer and chain always returns the same address.
curl "$CHAINRAIL_API/v1/deposit-addresses" \
-H "x-api-key: $CHAINRAIL_KEY" \
-H "content-type: application/json" \
-d '{ "chainId": "ethereum", "remoteCustomerId": "cus_123" }'
{ "address": "0x8f3a…b21c", "chainId": "ethereum", "remoteCustomerId": "cus_123" }
Show that address at checkout. When the customer pays, Chainrail detects the deposit, waits for confirmations, credits your ledger balance, and sweeps the funds into your hot wallet — no action needed from you.
5. Check your balance
curl "$CHAINRAIL_API/v1/balances" -H "x-api-key: $CHAINRAIL_KEY"
6. Pay out
Request a withdrawal against your available balance. Always send an
Idempotency-Key so a retry can never double-spend.
curl "$CHAINRAIL_API/v1/withdrawals" \
-H "x-api-key: $CHAINRAIL_KEY" \
-H "content-type: application/json" \
-H "Idempotency-Key: payout-2024-0001" \
-d '{
"chainId": "ethereum",
"symbol": "USDC",
"amount": "2500000",
"destinationAddress": "0xRecipient…",
"idempotencyKey": "payout-2024-0001"
}'
Chainrail reserves the funds atomically, broadcasts the transaction, and tracks it to confirmation.
Next steps
- Deposits guide — the full deposit lifecycle
- Withdrawals guide — payout states and retries
- Webhooks — get deposit/withdrawal events pushed to you
- API reference — every endpoint
Ready? Create your account and make your first call.