> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crossmint.com/llms.txt
> Use this file to discover all available pages before exploring further.

# REST API Quickstart

> Open a virtual account in staging and read its bank details

In this quickstart, you will open an EUR virtual account in the Staging environment. You will:

* Open a virtual account for a user
* Read the bank details the user sends transfers to

Deposits cannot be simulated in staging yet. [Contact Crossmint](https://www.crossmint.com/contact/sales) to run a test deposit through the provider's sandbox.

> [!NOTE]
>
> Virtual Accounts are gated in both staging and production. [Contact Crossmint](https://www.crossmint.com/contact/sales) to get access.

## Prerequisites

* **Verified user**: a staging user who has passed onramp KYC. See [User Onboarding and KYC](https://docs.crossmint.com/onramp/introduction/user-onboarding.md).
* **Registered wallet**: the user's wallet on Solana, linked to the user with ownership verified through the [Link Wallet API](https://docs.crossmint.com/api-reference/users/link-wallet.md). The user's own Crossmint wallet needs no linking.
* **API Key**: a staging server API key with the `virtual-accounts.create` and `virtual-accounts.read` scopes. In staging, all scopes are included by default.

## Integration Steps

**1. Open the Account**

Send the user, the currency, and the wallet and token that deposits go to.

```bash cURL theme={null}
curl --request POST \
    --url https://staging.crossmint.com/api/2026-09-16/virtual-accounts \
    --header 'X-API-KEY: <YOUR_SERVER_API_KEY>' \
    --header 'Content-Type: application/json' \
    --data '{
        "userLocator": "email:jane@example.com",
        "label": "EUR deposits",
        "source": {
            "currency": "eur"
        },
        "destination": {
            "walletAddress": "7vQ3mXk2Lp9RtYw4NcB8sHd6JfGa1ZeUoTq5Vr3k9Px",
            "tokenLocator": "solana:eurc"
        }
    }'
```

```js Node.js theme={null}
const response = await fetch("https://staging.crossmint.com/api/2026-09-16/virtual-accounts", {
    method: "POST",
    headers: {
        "X-API-KEY": "<YOUR_SERVER_API_KEY>",
        "Content-Type": "application/json",
    },
    body: JSON.stringify({
        userLocator: "email:jane@example.com",
        label: "EUR deposits",
        source: {
            currency: "eur",
        },
        destination: {
            walletAddress: "7vQ3mXk2Lp9RtYw4NcB8sHd6JfGa1ZeUoTq5Vr3k9Px",
            tokenLocator: "solana:eurc",
        },
    }),
});

console.log(await response.json());
```

```python Python theme={null}
import requests

response = requests.post(
    "https://staging.crossmint.com/api/2026-09-16/virtual-accounts",
    headers={"X-API-KEY": "<YOUR_SERVER_API_KEY>"},
    json={
        "userLocator": "email:jane@example.com",
        "label": "EUR deposits",
        "source": {
            "currency": "eur",
        },
        "destination": {
            "walletAddress": "7vQ3mXk2Lp9RtYw4NcB8sHd6JfGa1ZeUoTq5Vr3k9Px",
            "tokenLocator": "solana:eurc",
        },
    },
)

print(response.json())
```

The account returns `201` with the bank details in `depositInstructions`. In production, the user sends a bank transfer to that IBAN:

<Snippet file="virtual-account-create-response.mdx" />

Save the `virtualAccountId`. When the call answers `403 payments:virtual-account.not-eligible`, the user still has to pass KYC. See [When the User Is Not Eligible](https://docs.crossmint.com/virtual-accounts/guides/open-a-virtual-account.md#when-the-user-is-not-eligible). When `status` is `pending`, see [Wait for the Bank Details](https://docs.crossmint.com/virtual-accounts/guides/open-a-virtual-account.md#integration-steps).

## Learn More

> [card] [How Virtual Accounts Work](https://docs.crossmint.com/virtual-accounts/concepts/how-it-works.md)
>
> The flow of an account and of each deposit

> [card] [Open a Virtual Account](https://docs.crossmint.com/virtual-accounts/guides/open-a-virtual-account.md)
>
> Eligibility, terms of service, pending accounts, and errors
