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

# Top Up a Card

> Tops up an active card of a reloadable product.

Your `cards_visa` or `cards_mastercard` balance (depending on the card brand) is debited of the amount plus the service fee of the product. The top-up is applied
asynchronously: you receive `card.topup.completed` once the card is credited, or `card.topup.failed` if it
could not be applied — in that case the amount and the fee are refunded to the same `cards_visa` or `cards_mastercard` balance.

The amount must respect the product limits (`min_reload`, `max_reload`, `max_balance`).




## OpenAPI

````yaml POST /cards/{code}/topup
openapi: 3.1.0
info:
  title: KemyCard API
  version: '1.0'
  description: >
    KemyCard API allows you to issue virtual and physical cards, manage KYC/POA
    verification,

    create crypto wallets, virtual bank accounts, and purchase gift cards.
  contact:
    name: KemyCard API Support
    email: hi@kemycard.com
servers:
  - url: https://api.kemycard.com/v1
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Customers
    description: Manage your customers
  - name: Card Products
    description: Browse the card product catalog
  - name: Cards
    description: Issue and manage cards
  - name: KYC
    description: Identity verification
  - name: POA
    description: Proof of address verification
  - name: Wallets
    description: Crypto wallets
  - name: Virtual Accounts
    description: Virtual bank accounts
  - name: Gift Cards
    description: Gift card catalog and purchases
  - name: Balance
    description: Operational balances and transaction history
  - name: Webhooks
    description: Webhook endpoints and delivery management
paths:
  /cards/{code}/topup:
    post:
      tags:
        - Cards
      summary: Top up a card
      description: >
        Tops up an active card of a reloadable product.


        Your `cards_visa` or `cards_mastercard` balance (depending on the card
        brand) is debited of the amount plus the service fee of the product. The
        top-up is applied

        asynchronously: you receive `card.topup.completed` once the card is
        credited, or `card.topup.failed` if it

        could not be applied — in that case the amount and the fee are refunded
        to the same `cards_visa` or `cards_mastercard` balance.


        The amount must respect the product limits (`min_reload`, `max_reload`,
        `max_balance`).
      operationId: topupCard
      parameters:
        - $ref: '#/components/parameters/code'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - amount
              properties:
                amount:
                  type: number
                  minimum: 0.01
                  example: 50
                  description: Amount to top up
      responses:
        '202':
          description: Top-up accepted, applied asynchronously
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TopupResponse'
        '400':
          $ref: '#/components/responses/InsufficientBalance'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  parameters:
    code:
      name: code
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Resource UUID
  schemas:
    TopupResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          properties:
            card_code:
              type: string
              format: uuid
            status:
              type: string
              enum:
                - pending
              example: pending
            amount:
              type: number
              description: Amount that will be loaded on the card
              example: 100
            fee:
              type: number
              description: Service fee
              example: 5
            total_charged:
              type: number
              description: >-
                Amount debited from your `cards_visa` or `cards_mastercard`
                balance (amount + fee)
              example: 105
            currency:
              type: string
              example: USD
        meta:
          $ref: '#/components/schemas/Meta'
    Meta:
      type: object
      properties:
        request_id:
          type: string
          example: a4f8e2c1b3d97056
        mode:
          type: string
          enum:
            - test
            - live
          example: test
        timestamp:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: object
          properties:
            code:
              type: string
              example: VALIDATION_ERROR
            message:
              type: string
              example: Missing required fields.
            details:
              type: object
              nullable: true
        meta:
          $ref: '#/components/schemas/Meta'
  responses:
    InsufficientBalance:
      description: Insufficient ops balance
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: INSUFFICIENT_BALANCE
              message: Insufficient ops balance.
              details:
                required: 50
                available: 10
                balance_type: cards_mastercard
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: RESOURCE_NOT_FOUND
              message: Resource not found.
              details: null
    ValidationError:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key (sk_test_... or sk_live_...)

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.