Skip to main content

Overview

Offramps let your users convert stablecoin to fiat through a persistent payment route. The process involves two steps:
  1. Create a payment account: register the user’s bank account details as a payment account.
  2. Create an offramp payment route: set up the route that converts crypto to fiat and sends it to the payment account.
When a user sends stablecoin to the route’s deposit address, funds are automatically converted to fiat and transferred to their registered bank account.

Before you begin

Make sure you have:
  • API access to the payment accounts and payment routes endpoints.
  • User bank account details: the destination bank account information (account number, routing number, beneficiary details).
  • A stablecoin source: users need stablecoin on a supported chain to offramp.

Restrictions

Offramp payment routes are subject to the same restrictions & availability rules as any other payment route, plus Rain’s Payments compliance checks.

Key concepts

Payment accounts

A payment account is a stored representation of a user’s bank account or other fiat destination. Payment accounts let you:
  • Pre-validate bank account details before creating transfers.
  • Reuse the same destination across multiple payment routes or transfers.
  • Track payments associated with specific accounts.
For offramps, you create an externalFiatAccount type payment account containing the user’s bank details.

Payment routes

An offramp payment route creates a persistent pipe from crypto to fiat:
  • Source: stablecoin on a supported chain.
  • Destination: a payment account, the user’s bank account.
When you create an offramp payment route, Rain generates a depositAddress containing an onchain wallet address. Any stablecoin sent to this address is automatically converted to fiat and transferred to the payment account.

API flow

Action / API callExternal / networkWebhook Rain sends you
UserProvides bank details
1PartnerPOST /payment-accounts
2RainReturns payment account
3PartnerPOST /payment-routes
4RainReturns route with depositAddress
5PartnerProvides deposit address
6UserSends stablecoin to deposit address
7RainConverts to fiat
8BankReceives fiat transfer
9WebhooktransactionTransfer
The steps above, in text:

Step 1: create a payment account

Before creating an offramp payment route, you must register the user’s bank account as a payment account. Call POST /payment-accounts with the externalFiatAccount type. See Register a bank account for the full request, response, supported fields, and the first-party/third-party distinction for the account owner.

Step 2: create an offramp payment route

Once you have a payment account, create an offramp payment route by calling POST /payment-routes. See Create an offramp payment route for the full request, response, and field reference.
Refund address requiredThe refundAddress field is mandatory when creating an offramp payment route. Set this to a valid onchain address where stablecoin can be returned if a transaction cannot be completed. Funds may be returned due to:
  • Destination bank account issues (closed account, invalid details, account restrictions).
  • Transaction limits being exceeded.
  • Compliance or regulatory holds.
  • Failed fiat transfers rejected by the receiving bank.
If you don’t provide refundAddress, Rain rejects the payment route creation request. Make sure the refund address is a wallet you control and can receive the source stablecoin on the specified chain.
Address format requirementsThe refund address must match the expected format for the source rail:
  • EVM chains (Ethereum, Base, Polygon, Arbitrum, Optimism, Avalanche, Celo, ZKSync, Binance): must be a valid EVM address starting with 0x followed by 40 hexadecimal characters (for example, 0x1234567890abcdef1234567890abcdef12345678).
  • Solana: must be a valid Solana address in base58 format (32-44 characters).
If the address doesn’t match the source rail format, the request fails.
The response’s depositAddress is unique to this payment route. Only send the specified source currency (for example, USDC on Base) to this address. Sending other tokens may result in loss of funds.

Manage payment accounts

Use GET /payment-accounts, GET /payment-accounts/{paymentAccountId}, and DELETE /payment-accounts/{paymentAccountId} to list, retrieve, and remove payment accounts. See Manage payment accounts for the full request and response examples.
You can’t delete a payment account that an active payment route references. Delete the payment route first, then delete the payment account.

Manage payment routes

Use GET /payment-routes, GET /payment-routes/{paymentRouteId}, and DELETE /payment-routes/{paymentRouteId} to list, retrieve, and remove offramp payment routes. See Manage payment routes for the full request and response examples.

What happens when crypto is deposited

When a user sends stablecoin to the deposit address:
  1. Crypto received: Rain detects the incoming stablecoin transfer.
  2. Transfer created: Rain creates a transaction of type transfer and sends a transactionTransfer webhook with action created.
  3. Conversion: Rain converts stablecoin to fiat.
  4. Fiat transfer: Rain sends funds to the user’s bank account via the specified rail.
  5. Transfer completed: the transfer settles, and Rain sends a transactionTransfer webhook with action completed.

Webhooks

Rain sends webhooks through the transfer lifecycle: See the transfer object reference for the full webhook payload schema.

Transfer transaction

Each successful offramp creates a transfer transaction that you can query via the Transactions API. Filter by type=transfer to see all transfer transactions:
Example transfer transaction response:

Settlement times

After crypto is received, fiat transfer times vary by rail:

Cutoff times

Fiat transfer processing is subject to banking cutoff times. Rain processes transfers initiated after the cutoff on the next business day.
Cutoff times apply on US business days only. Transfers initiated on weekends or US federal holidays are processed on the next business day.

Supported configurations

Source (crypto)

Destination (fiat)

Rain regularly adds additional currencies and rails. Contact your Rain representative for the latest supported configurations.

Error handling

Payment account errors

Payment route errors

Best practices

  1. Validate bank details early: create payment accounts during user onboarding to catch errors before the user attempts to offramp.
  2. Use nicknames: assign meaningful nicknames to payment accounts for easy identification.
  3. Monitor webhooks: set up webhook handlers to track transfer status in real time.
  4. Handle failures gracefully: fiat transfers can fail due to bank issues. Implement retry logic and user notifications.

What’s next

Payment accounts

See the full request, response, and field reference for registering a bank account.

Payment routes

See the full request, response, and field reference for creating a payment route.

Set up onramps

Enable fiat deposits into crypto.

Set up webhooks

Receive transfer notifications as they happen.