> ## 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 a virtual card for the authenticated user. Virtual cards are issued instantly and can be used for online transactions. If the user does not yet have a cardholder, one is created automatically using the provided phone number (required for first card creation).



## OpenAPI

````yaml https://gp-auth-module.prod.gnosispay.com/openapi.json post /cards/virtual
openapi: 3.0.0
info:
  version: 1.0.0
  title: SIWE Authentication API
  description: Sign In With Ethereum authentication service
servers:
  - url: https://gp-auth-module.prod.gnosispay.com
    description: API server
security: []
paths:
  /cards/virtual:
    post:
      tags:
        - Cards
      summary: Create Virtual Card
      description: >-
        Create a virtual card for the authenticated user. Virtual cards are
        issued instantly and can be used for online transactions. If the user
        does not yet have a cardholder, one is created automatically using the
        provided phone number (required for first card creation).
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateVirtualCardRequest'
      responses:
        '202':
          description: Accepted - Virtual card creation accepted (pending process)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateVirtualCardSuccess'
        '400':
          description: Bad Request - User has no account
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationOrError'
        '401':
          description: Unauthorized - Invalid JWT
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: User not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Unprocessable - Phone number required or invalid format
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error - Virtual card creation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: Bad Gateway - Cardholder creation failed in core api
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - Bearer: []
components:
  schemas:
    CreateVirtualCardRequest:
      type: object
      properties:
        cardName:
          type: string
          minLength: 1
          maxLength: 50
        phone:
          type: string
          minLength: 6
          maxLength: 20
      required:
        - cardName
    CreateVirtualCardSuccess:
      type: object
      properties:
        cardId:
          type: string
          format: uuid
      required:
        - cardId
    ValidationOrError:
      anyOf:
        - $ref: '#/components/schemas/ValidationError'
        - $ref: '#/components/schemas/Error'
    Error:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: string
      required:
        - success
        - error
    ValidationError:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: object
          properties:
            name:
              type: string
              enum:
                - ValidationError
            message:
              type: string
          required:
            - name
            - message
      required:
        - success
        - error

````