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

# Card Operation

> Perform generic operations on virtual card



## OpenAPI

````yaml POST /virtual-cards/cards/{cardId}/operation
openapi: 3.1.0
info:
  title: GetMiPay API
  description: >-
    GetMiPay - Your universal gateway to getmipay. API for processing payments,
    payouts, and virtual cards through GetMiPay gateway.
  contact:
    name: GetMiPay Support
    email: support@getmipay.com
  license:
    name: Proprietary
    url: https://getmipay.com/
  version: 1.1.0
servers:
  - url: https://sandbox.getmipay.com/api
    description: Sandbox server
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: API authentication and token management
  - name: Services
    description: Get available payment services
  - name: Currency
    description: API for converting amounts between different currencies.
  - name: Payments
    description: Collect payments from customers
  - name: Payouts
    description: Send money to customers
  - name: Transactions
    description: Check transaction status
  - name: Balance
    description: Account balance management
  - name: Virtual Cards
    description: Virtual card creation and management
  - name: Webhooks
    description: Webhook endpoints for payment notifications
paths:
  /virtual-cards/cards/{cardId}/operation:
    post:
      tags:
        - Virtual Cards
      summary: Card Operation
      description: Perform generic operations on virtual card
      parameters:
        - name: cardId
          in: path
          description: Virtual card ID
          required: true
          schema:
            type: string
            example: CARD_123456
      requestBody:
        description: Operation details
        content:
          application/json:
            schema:
              type: object
              required:
                - action
              properties:
                action:
                  type: string
                  enum:
                    - topup
                    - withdraw
                    - enable
                    - disable
                    - get_balance
                    - get_transactions
                  example: topup
                amount:
                  type: number
                  minimum: 0.01
                  example: 50
                currency:
                  type: string
                  enum:
                    - USD
                    - EUR
                    - XAF
                  example: USD
        required: true
      responses:
        '200':
          description: Operation completed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CardOperationResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    CardOperationResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          properties:
            operation:
              type: string
              example: topup
            card_id:
              type: string
              example: CARD_123456
            new_balance:
              type: number
              example: 20
            currency:
              type: string
              example: USD
            status:
              type: string
              example: success
            transactions:
              type: array
              description: List of transactions (for transactions action)
              items:
                type: object
                properties:
                  id:
                    type: string
                    example: TXN_123
                  amount:
                    type: number
                    example: 10
                  currency:
                    type: string
                    example: USD
                  type:
                    type: string
                    example: topup
                  status:
                    type: string
                    example: completed
                  created_at:
                    type: string
                    format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT bearer token returned by POST /action/auth. Send protected requests
        with: Authorization: Bearer <jwt>. Tokens expire after 24 hours.

````