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

# Create a Card

> Virtual card API: create a USD Visa or Mastercard virtual card for a customer with KYC and optional prefund (asynchronous).

This resource allows you to create a card for a customer. This operation is asynchronous, meaning we notify you via a webhook event on the final status.


## OpenAPI

````yaml api-reference/openapi.json POST /pms/api/external/request/virtual-cards/
openapi: 3.1.0
info:
  title: PayVessel API
  description: >-
    PayVessel API for accepting payments, sending money, verifying identities,
    and managing wallets
  version: 1.0.0
servers:
  - url: https://api.payvessel.com
  - url: https://sandbox.payvessel.com
security:
  - {}
paths:
  /pms/api/external/request/virtual-cards/:
    post:
      tags:
        - Issuing
      summary: Create a Card
      description: >-
        Create a USD virtual card for a customer with full KYC and initial
        prefund. This operation is asynchronous: the response returns a card in
        PENDING status, and PayVessel notifies you via a webhook when the card
        reaches its final status (for example ACTIVE). You may also poll Get a
        Card until activation completes.
      operationId: externalVirtualCardsCreate
      parameters:
        - name: api-key
          in: header
          description: Your Payvessel public API key
          required: true
          schema:
            type: string
        - name: api-secret
          in: header
          description: Your Payvessel secret
          required: true
          schema:
            type: string
        - name: Content-Type
          in: header
          description: Request content type
          required: true
          schema:
            type: string
            enum:
              - application/json
          example: application/json
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomerVirtualCardRequest'
            examples:
              fullKyc:
                summary: Full customer KYC
                value:
                  first_name: Jane
                  last_name: Doe
                  email: jane.doe@example.com
                  phone: '08031234567'
                  bvn: '22345678901'
                  nin: '12345678901'
                  dob: '1990-05-15'
                  image: data:image/jpeg;base64,YOUR_BASE64_IDENTITY_IMAGE
                  state: Lagos
                  lga: Ikeja
                  street: 12 Admiralty Way, Lekki Phase 1
                  postal_code: '101233'
                  brand: VISA
                  currency: USD
                  prefund_amount: '10.00'
                  card_name: Jane Doe
      responses:
        '201':
          description: Virtual card creation started
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VirtualCardResponse'
              examples:
                pending:
                  summary: Card creation started
                  value:
                    status: true
                    message: Virtual card creation started
                    data:
                      id: 7f219a25-d968-4894-9a8b-ba83fa0bf6ec
                      status: PENDING
                      masked_pan: ''
                      balance: '10.00'
                      currency: USD
                      brand: VISA
        '401':
          description: Unauthorized request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                unauthorized:
                  summary: Invalid credentials
                  value:
                    error: 401
                    message: Unauthorized. Please check your API key.
        '403':
          description: Forbidden request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CreateCustomerVirtualCardRequest:
      type: object
      required:
        - brand
        - currency
      properties:
        first_name:
          type: string
          description: Customer first name
        last_name:
          type: string
          description: Customer last name
        email:
          type: string
          format: email
          description: Email address
        phone:
          type: string
          description: Nigerian phone number
        bvn:
          type: string
          description: 11-digit Bank Verification Number
        nin:
          type: string
          description: 11-digit National Identification Number
        dob:
          type: string
          format: date
          description: Date of birth (YYYY-MM-DD)
        image:
          type: string
          description: Base64-encoded identity document image
        state:
          type: string
          description: State of residence
        lga:
          type: string
          description: Local government area
        street:
          type: string
          description: Street address
        postal_code:
          type: string
          description: Postal code
        brand:
          type: string
          enum:
            - VISA
            - MASTERCARD
          description: Card network
        currency:
          type: string
          enum:
            - USD
          description: Must be USD for customer cards
        prefund_amount:
          type: string
          description: Optional initial card balance in USD (minimum 3.00 when provided)
          example: '10.00'
        card_name:
          type: string
          description: Optional label on card (max 255 characters)
    VirtualCardResponse:
      type: object
      required:
        - status
        - message
        - data
      properties:
        status:
          type: boolean
          description: Indicates whether the request succeeded
        message:
          type: string
          description: Human-readable result message
          example: Virtual card creation started
        data:
          $ref: '#/components/schemas/IssuedCard'
          description: Issued card details
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
    IssuedCard:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: PayVessel card ID
        business_id:
          type: string
          format: uuid
          description: Owning business
        kind:
          type: string
          description: customer card
        customer_id:
          type: string
          format: uuid
          description: Linked customer ID
        customer_name:
          type: string
          description: Customer display name
        card_name:
          type: string
          description: Name on card
        masked_pan:
          type: string
          description: Masked PAN (empty while PENDING)
        status:
          type: string
          enum:
            - PENDING
            - ACTIVE
            - FROZEN
            - TERMINATED
            - FAILED
          description: Card lifecycle status
        currency:
          type: string
          description: USD
        brand:
          type: string
          description: VISA or MASTERCARD
        balance:
          type: string
          description: Issuer-synced balance in USD
        expiry:
          type: string
          description: Card expiry (MM/YY)
        card_number:
          type: string
          description: Full PAN (GET card only, when ACTIVE/FROZEN)
        cvv:
          type: string
          description: CVV (GET card only, when ACTIVE/FROZEN)
        created_datetime:
          type: string
          format: date-time
        updated_datetime:
          type: string
          format: date-time

````