> ## 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.

# How money flows

> Ops balances, customer wallets and cards: where the money is, and how it moves

KemyCard is the infrastructure **behind** your product. Your customers sign up in **your** application, pay **you** with **your** payment methods, and see **your** brand. Your servers call the KemyCard API to verify them and to issue and fund their cards. Your customers have no direct access to KemyCard.

## Your system and ours

```mermaid theme={null}
flowchart LR
    subgraph YOU["YOUR SYSTEM — your brand, your rules"]
        direction TB
        APP["Your app or website"]
        PAY["Your payment methods<br/>(mobile money, bank transfer,<br/>card, cash, crypto…)"]
        LED["Your ledger<br/>(the balance of each customer<br/>in your system)"]
        SRV["Your servers"]
        TR["Your treasury"]
    end

    subgraph KC["KEMYCARD — the infrastructure"]
        direction TB
        API["KemyCard API"]
        OPSB["Your ops balances"]
        KYC["Identity verification"]
        CRD["Cards"]
    end

    U["Your customer"]

    U -- "signs up, pays you,<br/>asks for a card" --> APP
    U -- "pays" --> PAY
    PAY -- "credited" --> LED
    APP <--> SRV
    SRV -- "API calls<br/>(API key, your server IPs)" --> API
    API -- "webhooks<br/>(signed events)" --> SRV
    PAY -. "you convert and send<br/>USDC on Solana" .-> TR
    TR -- "deposit" --> OPSB
    API --> KYC
    API --> CRD
    OPSB -- "pays creation and loads" --> CRD
    U -- "opens the verification link<br/>you give them" --> KYC
```

> **What you do**
>
> You own the customer relationship: sign-up, your prices, **collecting the money of your customers by your own means**, their balance in your system, support, and the decision to issue or top up a card.

> **What KemyCard does**
>
> We verify the identity of each customer, issue the cards through our banking partners, debit your ops balances, and send you a webhook for every event.

> [!NOTE]
>
> **Your customers' payments do not reach KemyCard.** How you collect money from your customers, and what you charge them, is your decision and your responsibility. KemyCard only sees the USDC you deposit on your ops balances. Keep the balance of each customer in **your** system: KemyCard does not keep it for you.

### A customer, step by step

```mermaid theme={null}
sequenceDiagram
    autonumber
    actor U as Your customer
    participant A as Your system
    participant K as KemyCard API

    U->>A: Signs up in your app
    A->>K: POST /customers
    K-->>A: customer code
    A->>K: POST /kyc/{customerCode}/link
    K-->>A: verification link
    A->>U: Shows the link
    U->>K: Completes the verification (ID + selfie)
    K-->>A: Webhook kyc.approved
    U->>A: Pays you (your own payment methods)
    A->>A: Credits the customer in your ledger
    Note over A: Beforehand, you funded your ops balance<br/>with USDC on Solana
    U->>A: Asks for a card
    A->>K: POST /cards (paid from your ops balance)
    K-->>A: Webhook card.activated
    A->>A: Debits the customer in your ledger
    U->>A: Opens the card in your app
    A->>K: GET /cards/{code}/sensitive
    A->>U: Shows the card details (never stored)
    U->>A: Asks for a top-up
    A->>K: POST /cards/{code}/topup (paid from your ops balance)
    K-->>A: Webhook card.topup.completed
```

1. **Your customer only talks to you.** Sign-up, payment, card request, support: everything happens in your application.
2. **Your servers talk to KemyCard.** With your API key, from your allowed IP addresses, never from the app of your customer.
3. **Two ledgers, two kinds of balance.** In **your** system, the balance your customer paid you. At KemyCard, **your** ops balances, which pay for the cards. You keep enough on your ops balances, and you debit your customer in your system when you issue or top up their card.
4. **Webhooks keep both systems in sync.** Update your application when you receive `kyc.approved`, `card.activated`, `card.topup.completed` or `card.transaction`.

## Where the money is

KemyCard keeps **two kinds of money apart**: **your money**, on your ops balances, and **your customers' money**, on their wallets if you use [crypto wallets](https://docs.kemycard.com/guides/wallets.md) to collect it. Cards are always funded with **your** money.

```mermaid theme={null}
flowchart LR
    T["Your treasury<br/>(exchange or wallet)"]

    subgraph OPS["Your ops balances — YOUR money"]
        direction TB
        V["cards_visa"]
        M["cards_mastercard"]
        O["others"]
        G["gift_cards"]
        S["payout_sepa"]
    end

    subgraph CARDS["Cards of your customers"]
        direction TB
        CV["Visa cards"]
        CM["Mastercard cards"]
    end

    subgraph WAL["Customer wallets — YOUR CUSTOMERS' money"]
        direction TB
        SW["Standard wallet<br/>(own balance)"]
        CW["Collect wallet"]
    end

    C["Your customer"]
    VA["Virtual account<br/>(EUR, USD, MXN, BRL…)"]
    X["Any external address"]
    D["Your destination_address"]

    T -- "USDC on Solana<br/>deposit fee of your plan" --> OPS
    V -- "creation + load fee" --> CV
    M -- "creation + load fee" --> CM
    CV -. "card withdrawal" .-> V
    CM -. "card withdrawal" .-> M
    O -- "KYC, POA, wallet and account creation,<br/>ACH payouts, plan" --> F["Fees and payouts"]
    G --> GC["Gift cards"]
    S --> SP["SEPA payouts"]

    C -- "USDC / USDT<br/>Solana, Base, Ethereum, Tron" --> SW
    C -- "USDC<br/>Solana, Base" --> CW
    VA -- "destination: wallet" --> SW
    SW -- "withdrawal through the API" --> X
    CW -- "automatic forward from $3" --> D
```

## The three rules

> **Cards use your ops balance**
>
> A Visa card is created and loaded from `cards_visa`, a Mastercard card from `cards_mastercard`. A card withdrawal goes back to the same balance.

> **Wallets hold your customers' money**
>
> Each wallet has its own balance. It is never mixed with your ops balances, and it never pays for a card or a fee.

> **Ops balances are funded in USDC on Solana**
>
> From your own exchange or wallet, to the deposit address of each balance. Funds cannot move from one ops balance to another.

## Using your customers' money on a card

**A wallet cannot load a card directly.** If your customer pays you on a wallet and you want to load their card with that money, you do it in two steps:

**1. Get the funds out of the wallet**

Withdraw them through the API (standard wallet), or let the collect wallet forward them automatically to your `destination_address`. The fee of the withdrawal or of the forward applies.

**2. Fund your ops balance**

Send USDC on Solana from your treasury to the deposit address of `cards_visa` or `cards_mastercard`. The deposit fee of your plan applies.

**3. Load the card**

Create or top up the card: it is paid from your ops balance, with the creation or load fee of your plan.

> [!TIP]
>
> Most partners keep enough on their ops balances and load cards right away, then receive their customers' payments on wallets. The two flows run side by side: you decide when to move money from one to the other.

## Quick answers

| Question | Answer |
| - | - |
| Which balance pays for a Visa card? | `cards_visa` (creation, load and top-up). |
| Can a customer wallet pay for a card? | No. Withdraw or forward the funds, then fund your ops balance. |
| Can I move money from `others` to `cards_visa`? | No. Each ops balance is funded by its own deposit. |
| Where does a card withdrawal go? | Back to the ops balance of the card brand. |
| Who pays the KYC of a customer? | Your `others` ops balance. |
| Where do virtual account payments go? | To the customer's KemyCard wallet, or to an external address, as chosen when the account is created. |

See also: [Ops Balance](https://docs.kemycard.com/guides/ops-balance.md), [Crypto Wallets](https://docs.kemycard.com/guides/wallets.md), [Top up a card](https://docs.kemycard.com/guides/topup-card.md), [Plans and fees](https://docs.kemycard.com/getting-started/plans.md).


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