> ## Documentation Index
> Fetch the complete documentation index at: https://gnosispay-feat-v2-auth-module.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Virtual Card

> Create and Manage Virtual Cards for Users.

Virtual cards are activated immediately after creation and can be used for online purchases right away.

## Card Activation

To create a card for a user, call [`POST /cards/virtual`](/api-reference/cards/create-virtual-card) with a `cardName`. Once successful, you will get a `cardId`.
The card's `status` will first be `provisioning` until our card provider has fully created the card. This is an asynchronous task. We recommend showing this `status` to your users, and polling the `/cards` endpoint regularly until it becomes `active`. The provisionning process should not last most than 10s.

The request accepts an optional `phone` field (E.164 format). The behaviour depends on whether the user already has a `cardholderId`:

| Scenario                                  | Result                                             |
| ----------------------------------------- | -------------------------------------------------- |
| User already has a `cardholderId`         | Card created directly; `phone` is ignored          |
| No `cardholderId`, no `phone` provided    | `422 PHONE_REQUIRED`                               |
| No `cardholderId`, valid `phone` provided | Cardholder created via Core API, then card created |

<Tabs>
  <Tab title="Sandbox">
    ```bash theme={null}
    curl --request POST \
      --url https://gp-auth-module.sandbox.gnosispay.in/cards/virtual \
      --header 'Content-Type: application/json' \
      --data '{
      "cardName": "<string>",
      "phone": "<string>"
    }'
    ```
  </Tab>

  <Tab title="Production">
    ```bash theme={null}
    curl --request POST \
      --url https://gp-auth-module.prod.gnosispay.com/cards/virtual \
      --header 'Content-Type: application/json' \
      --data '{
      "cardName": "<string>",
      "phone": "<string>"
    }'
    ```
  </Tab>
</Tabs>
