Skip to main content
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.
When you create an onramp payment route, Rain generates a 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
UserRequests banking details
1PartnerPOST /payment-routes
2RainReturns route with depositAddress
3PartnerProvides virtual account details
4UserSends ACH/wire transfer
5RainConverts to stablecoin
6DestinationReceives stablecoin deposit
7WebhooktransactionTransfer
The steps above, in text:

Create an onramp payment route

To create an onramp payment route, call POST /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 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 destination rail format, the request fails.

Manage payment routes

Use GET /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.
Deleting a payment route invalidates the associated virtual account. Any subsequent transfers to those banking credentials fail. Notify your users before deleting a payment route.

What happens when funds are received

When a user sends funds to the virtual account:
  1. Funds received: Rain receives the fiat transfer at the virtual account. Deposits under $2.00 don’t create a transfer.
  2. Transfer created: Rain creates a transaction of type transfer and sends a transactionTransfer webhook with action created.
  3. Conversion: Rain automatically converts funds to the destination stablecoin.
  4. Transfer: Rain sends stablecoin to the destination onchain address.
  5. Transfer completed: the transfer reaches a final state, 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 onramp 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:
To list the transfer transactions for a specific user, see Viewing 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

  1. Monitor webhooks: set up webhook handlers to track transfer status in real time instead of polling.
  2. Handle failures gracefully: fiat transfers can fail due to bank issues on the sender’s side. Implement retry logic and user notifications.
  3. Validate destination addresses client-side: catch malformed onchain addresses before calling POST /payment-routes to 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.