Endpoint MigrationThe
/v1/automations endpoints have been renamed to /v1/payment-routes. The old /v1/automations paths remain available as deprecated aliases during migration. Update your integrations to use /v1/payment-routes as the deprecated endpoints will be removed in a future release.Overview
Onramps let your users convert fiat to stablecoin through a persistent payment route. When you create an onramp payment route, Rain generates a virtual account with unique banking credentials. Any funds sent to that virtual account are automatically converted to the destination stablecoin and delivered to the destination onchain address.If you’re funding a Rain-Managed program’s collateral contract specifically,
Rain also offers a dedicated onramp flow built
on the contracts API, which returns ACH, RTP, and wire details together
instead of a single virtual account.
Before you begin
Make sure you have:- API access to the payment routes endpoints.
- A destination address: an onchain wallet address where converted stablecoin is delivered. This can be a Rain smart contract or an external wallet.
- A US bank account: your end users need one to initiate fiat transfers.
Restrictions
Onramp payment routes are subject to the same restrictions & availability rules as any other payment route, plus Rain’s Payments compliance checks.Key concepts
Payment routes
A payment route creates a persistent pipe between a source and destination. For onramps:- Source: fiat via ACH or wire transfer.
- Destination: an onchain address on a supported chain.
depositAddress containing virtual account banking credentials. This virtual account acts as the named beneficiary for incoming fiat transfers. See What a payment route is for how Rain determines direction for both onramps and offramps.
Virtual accounts
Virtual accounts are dedicated banking credentials that Rain generates for receiving fiat transfers, not payment accounts you register yourself. Each onramp payment route generates its own virtual account, giving your users unique ACH and wire transfer details.First-party and third-party transfers
Virtual accounts support both first-party and third-party incoming transfers:- First-party: the user who owns the payment route sends funds from their own bank account.
- Third-party: a different party sends funds to the virtual account on behalf of the user, for example an employer funding an employee’s account.
API flow
Action / API callExternal / userWebhook Rain sends you
Create an onramp payment route
To create an onramp payment route, callPOST /payment-routes with a fiat
source and an onchain destination. See Create an onramp payment
route for the full
request, response, and field reference; the shape is identical for onramps
created from this page.
Destination address formatThe destination address must match the expected format for the destination rail:
- EVM chains (Ethereum, Base, Polygon, Arbitrum, Optimism, Avalanche, Celo): must be a valid EVM address starting with
0xfollowed by 40 hexadecimal characters (for example,0x1234567890abcdef1234567890abcdef12345678). - Solana: must be a valid Solana address in base58 format (32-44 characters).
Manage payment routes
UseGET /payment-routes, GET /payment-routes/{paymentRouteId}, and
DELETE /payment-routes/{paymentRouteId} to list, retrieve, and remove
onramp payment routes. See Manage payment
routes for the full request
and response examples.
What happens when funds are received
When a user sends funds to the virtual account:- Funds received: Rain receives the fiat transfer at the virtual account. Deposits under $2.00 don’t create a transfer.
- Transfer created: Rain creates a transaction of type
transferand sends atransactionTransferwebhook with actioncreated. - Conversion: Rain automatically converts funds to the destination stablecoin.
- Transfer: Rain sends stablecoin to the destination onchain address.
- Transfer completed: the transfer reaches a final state, and Rain sends a
transactionTransferwebhook with actioncompleted.
Webhooks
Rain sends webhooks through the transfer lifecycle:
See the transfer object reference for the full webhook payload schema.
Transfer transaction
Each successful onramp creates atransfer transaction that you can query via
the Transactions API. Filter
by type=transfer to see all transfer transactions:
Settlement times
Transfer times vary by rail:
After fiat settlement, the conversion and onchain transfer typically complete within minutes.
Cutoff times
Fiat transfer processing is subject to banking cutoff times. Transfers received after the cutoff are processed 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 (fiat)
Destination (crypto)
Rain regularly adds additional currencies and chains. Contact your Rain
representative for the latest supported configurations.
Error handling
Common error scenarios when creating a payment route:Best practices
- Monitor webhooks: set up webhook handlers to track transfer status in real time instead of polling.
- Handle failures gracefully: fiat transfers can fail due to bank issues on the sender’s side. Implement retry logic and user notifications.
- Validate destination addresses client-side: catch malformed onchain addresses before calling
POST /payment-routesto avoid a round trip on an avoidable error.
What’s next
Payment routes
See the full request, response, and field reference shared by onramps and offramps.
Set up offramps
Enable fiat withdrawals from crypto.
Onramp to Rain Contract
Fund a Rain-Managed program’s collateral contract directly instead.
Set up webhooks
Receive transfer notifications as they happen.