> ## Documentation Index
> Fetch the complete documentation index at: https://rain-sandbox-trial.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Open a Virtual Account

> Create a payment route, get named virtual account deposit details, and watch fiat convert and land on-chain.

This quickstart takes an approved customer from a payment route to a live
virtual account: create the route, get its deposit details, and receive fiat
that Rain converts to stablecoin and delivers on-chain.

## Before you begin

Complete the [shared setup steps](/docs/quickstarts): get your API keys,
configure webhooks, and get your customer through compliance approval.
Opening a virtual account also needs the payments verification described in
[Payments Compliance](/docs/payments-compliance), since Rain gates money
movement independently from card-issuing approval.

<Steps>
  <Step title="Confirm payments verification">
    Opening a virtual account runs a check that's separate from the Cards KYC
    or KYB you completed in the hub: an account-owner verification called a
    Customer Identification Program (CIP) check. Rain runs this automatically
    for Rain-Managed customers. For Partner-Managed customers, you verify the
    account owner yourself and Rain still screens the party.

    You don't call a separate endpoint for this. Creating a payment route in
    the next step checks the customer's verification for you:

    * A verified customer gets an `active` route synchronously.
    * An unverified customer gets a `403` by default. Programs with deferred
      KYC enabled get a `pending` route instead, which activates once the
      customer clears verification, as described in the next step.

    See [Payments Compliance](/docs/payments-compliance) for the full
    picture, including transaction monitoring and on-chain screening.
  </Step>

  <Step title="Create a payment route">
    Call the payment routes endpoint with a fiat source and an onchain
    destination. Rain checks payments verification and regional restrictions
    at creation time.

    ```bash theme={null}
    curl -X POST https://api.rain.xyz/v1/payment-routes \
      -H "Api-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "userId": "11111111-1111-1111-1111-111111111111",
        "source": {
          "currency": "usd",
          "rail": "ach"
        },
        "destination": {
          "currency": "usdc",
          "rail": "base",
          "address": {
            "type": "onchain",
            "address": "0x1234567890abcdef1234567890abcdef12345678"
          }
        }
      }'
    ```

    See [Create a Payment Route](/reference/paymentroutes/create-a-payment-route)
    for the full request and response reference.

    <Info>
      For a customer who has already cleared payments verification, Rain
      provisions the route synchronously: it comes back `active` with a full
      `depositAddress`, shown in the next step. On a program with deferred KYC
      enabled, an unverified customer's route comes back `pending` with no
      `depositAddress`. Continue to the next step in that case.
    </Info>
  </Step>

  <Step title="Get the named virtual account details">
    An `active` route's `depositAddress` is the virtual account: a named
    beneficiary account you give to your customer so they can send fiat by
    ACH or wire.

    ```json theme={null}
    {
      "id": "a1b2c3d4-5e6f-7081-9234-56789abcdef0",
      "userId": "11111111-1111-1111-1111-111111111111",
      "status": "active",
      "source": {
        "currency": "usd",
        "rail": "ach"
      },
      "destination": {
        "currency": "usdc",
        "rail": "base",
        "address": {
          "type": "onchain",
          "address": "0x1234567890abcdef1234567890abcdef12345678"
        }
      },
      "depositAddress": {
        "type": "fiat",
        "beneficiaryBankName": "SSB BANK",
        "accountNumber": "1234567890",
        "routingNumber": "043087080"
      },
      "createdAt": "2026-06-11T15:30:00.000Z",
      "updatedAt": "2026-06-11T15:30:00.000Z"
    }
    ```

    If your route came back `pending` instead, wait for the
    `paymentRoute.created` webhook before you share deposit details:

    <Info>
      A `pending` route is returned immediately from the create call so you
      have its `id`, but wait for the `paymentRoute.created` webhook before
      you share deposit details with the customer. See
      [Payment Routes](/docs/paymentRoute) for the full webhook payload.
    </Info>
  </Step>

  <Step title="Funds land on-chain">
    Once your customer sends fiat to the virtual account, Rain converts it to
    the destination stablecoin and delivers it to the onchain address you
    specified, no additional API call needed.

    Rain notifies you as the transfer progresses through the
    `transactionTransfer` webhooks. See [Transaction Webhooks](/docs/transaction)
    for the full lifecycle and payload.
  </Step>
</Steps>

## What's next

<Columns cols={3}>
  <Card title="Onramps" icon="building-columns" href="/docs/onramps">
    See the full onramp guide, including supported currencies, chains, and
    error handling.
  </Card>

  <Card title="Payments Compliance" icon="shield-check" href="/docs/payments-compliance">
    Understand account-owner verification, transaction monitoring, and
    on-chain screening.
  </Card>

  <Card title="Transaction Webhooks" icon="bell" href="/docs/transaction">
    Track a transfer from creation through settlement.
  </Card>
</Columns>
