Skip to main content
Read endpoints for withdrawals use deposits.read scope. Create still requires withdrawals.write.

Overview

  • GET /partner/v1/withdrawals/assets: list destination assets.
  • POST /partner/v1/withdrawals/range: get min/max for a destination pair.
  • POST /partner/v1/withdrawals/estimate: quote destination receive amount for a given amount.
  • POST /partner/v1/withdrawals: create relay + fetch Rain withdrawal signature payload.
POST /partner/v1/withdrawals uses a breaking request body shape with source and destination objects.
Withdrawal routes are dynamic (BTC/SOL/EVM and others) and can change. Always call assets, range, and estimate before create. In sandbox, source is fixed to rUSD on Base Sepolia. source.contractId is optional.

Flow

API flows (step-by-step)

1

1) Discover destination assets

Endpoint: GET /partner/v1/withdrawals/assets
You can optionally pass sourceChainId and sourceTokenAddress as hints, but they are not required.
2

2) Get min/max for chosen route

Endpoint: POST /partner/v1/withdrawals/range
3

3) Estimate destination receive amount

Endpoint: POST /partner/v1/withdrawals/estimate
4

4) Create withdrawal signature payload (breaking schema)

Endpoint: POST /partner/v1/withdrawals
Ready responses include:
  • execution info for contract call routing.
  • relay metadata (payinAddress, payinExtraId, payoutAddress, payoutExtraId, route ids).
5

5) Execute onchain

  • from must be the same admin EOA used in the create request (adminAddress).
  • to must be execution.callTarget (controller or coordinator), not the collateral proxy address.
  • Use parameters in order: [collateralProxy, token, amount, recipient, expiresAt, executorSalt, executorSignature].
  • If execution.callPath = controller_v1, call 7-arg withdrawAsset(…).
  • If execution.callPath = coordinator_v2, call 10-arg withdrawAsset(…) and include v2 admin signature values.
  • If status is pending, wait retryAfterSeconds and retry the same request with the same idempotency key.

Onchain execution details

For coordinator_v2, you must generate an additional admin signature before calling the contract.

Relay metadata fields

string
Provider exchange id for relay tracking.
string
Address Rain withdrawal sends funds to.
string
Optional memo/tag required on relay pay-in side.
string
Final destination address configured on the relay.
string
Optional destination memo/tag configured for payout.