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

# Fiat ledger assets

> How BOB, MXN and ARS balances behave in the CBPay ledger and which products support them

export const EnvUrls = ({lang = "en"}) => {
  const T = {
    en: {
      test: "Test",
      live: "Live",
      hint: "Same API on both environments — build against test first, then go live by swapping the base URL and the key.",
      guide: "Environments and testing",
      href: "/en/environment-testing"
    },
    es: {
      test: "Test",
      live: "Live",
      hint: "La misma API en ambos ambientes — construye primero contra test y pasa a live cambiando la URL base y la key.",
      guide: "Entorno y pruebas",
      href: "/es/environment-testing"
    },
    zh: {
      test: "Test",
      live: "Live",
      hint: "两个环境的 API 完全一致——先在 test 环境构建，再通过切换基础 URL 和密钥上线。",
      guide: "环境与测试",
      href: "/zh/environment-testing"
    }
  };
  const t = T[lang] || T.en;
  const row = (label, url, keyPattern, badgeCls) => <div className="flex flex-wrap items-center gap-2 px-3 py-2">
      <span className={"rounded px-1.5 py-0.5 text-xs font-semibold uppercase tracking-wide " + badgeCls}>
        {label}
      </span>
      <code className="text-xs">{url}</code>
      <span className="text-xs text-gray-400 dark:text-zinc-500">·</span>
      <code className="text-xs">{keyPattern}</code>
    </div>;
  return <div className="my-4 rounded-xl border border-gray-200 dark:border-zinc-700 divide-y divide-gray-200 dark:divide-zinc-700 text-sm not-prose">
      {row(t.test, "https://cryptobank.qbank.cl/platform", "pk_test_...", "bg-amber-100 text-amber-800 dark:bg-amber-900/40 dark:text-amber-300")}
      {row(t.live, "https://api.qbank.cl/platform", "pk_...", "bg-emerald-100 text-emerald-800 dark:bg-emerald-900/40 dark:text-emerald-300")}
      <p className="px-3 py-2 text-xs text-gray-500 dark:text-zinc-400 m-0">
        {t.hint} <a href={t.href}>{t.guide} →</a>
      </p>
    </div>;
};

<EnvUrls lang="en" />

CBPay accounts now expose three fiat ledger assets: **BOB**, **MXN** and
**ARS**. They are independent balances, stored with two decimal places
(minor units), and appear alongside USD, USDT, USDC, BTC, GOLD, SILVER and
PLATINUM.

```mermaid theme={"theme":{"light":"github-light","dark":"github-dark"}}
flowchart LR
  balances["GET /v1/balances"] --> ledger["10 ledger assets"]
  history["GET /v1/balances/history"] --> ledger
  analytics["GET /v1/analytics/summary"] --> valuation["feed price or unpriced"]
```

## Where fiat assets appear

The following account endpoints include the three fiat assets:

* `GET /v1/balances`: always returns all ten ledger assets, including zero
  rows. Fiat values use two decimals, for example `"125.40"`.
* `GET /v1/balances/history`: includes a daily series for each fiat asset.
  The `available` balance is tracked; held amounts are exposed by the
  current snapshot.
* `GET /v1/analytics/summary`: includes fiat balances and volumes when they
  exist. USD valuation uses the organization rate feed (`1 / local-per-USD`);
  if no valid rate exists, the asset is reported as unpriced and excluded
  from USD totals.

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "account_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
  "balances": [
    { "asset": "BOB", "available": "15000.00", "held": "0.00" },
    { "asset": "MXN", "available": "0.00", "held": "0.00" },
    { "asset": "ARS", "available": "0.00", "held": "0.00" }
  ]
}
```

## Transfers

`POST /v1/transfers` permits a same-asset transfer when the source and
destination accounts use the same asset. A fiat transfer keeps its two-decimal
precision; it is not implicitly converted to USDT or another currency.

## Product gates in v1

The ledger registration does not mean every product can spend fiat:

| Product | BOB/MXN/ARS in v1 |
| - | - |
| Account balances, history and analytics | Supported |
| Same-asset internal transfers | Supported |
| Payout settlement asset and organization defaults | Accepted; fiat execution returns `503 pricing_unavailable` until fiat settlement pricing ships |
| Swaps | Rejected with `400 invalid_pair` |
| Checkout | Rejected as a settlement asset with `invalid_asset` |
| POS | Rejected as a settlement asset with `invalid_asset` |
| Cards | Rejected with `400 spending_asset_unavailable` |

This separation is intentional: a balance can exist in the ledger before a
pricing or external settlement path is available.

## Errors and precision

Amounts are decimal strings. `1.50` BOB means 150 minor units; `1.234` BOB,
MXN or ARS is rejected. A fiat settlement request may be syntactically valid
but still return `503 pricing_unavailable` until the fiat payout settlement
path is implemented.

<AccordionGroup>
  <Accordion title="Does adding a fiat asset change my default settlement asset?">
    No. Your default is unchanged. A fiat asset is only used
    when explicitly enabled and accepted by the relevant product gate.
  </Accordion>

  <Accordion title="Can I use a fiat balance to pay a card purchase?">
    No. Cards reject fiat spending assets in v1; the balance remains visible and
    usable by the products listed as supported above.
  </Accordion>
</AccordionGroup>


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