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

# Overview

> Create accounts, move funds, and query transaction history for your end-users.

The Partner API financial endpoints let you manage the full money lifecycle for your users: fund accounts, transfer between accounts, initiate payouts to external destinations, and retrieve transaction history — all from your own backend using your API credentials.

```
End User → Your App → Your Backend → Qash Partner API
                             ↑
                Authorization: Bearer <user-access-token>
```

## Base URL

| Environment | URL                       |
| ----------- | ------------------------- |
| Production  | `https://api.qash.ai`     |
| Staging     | `https://staging.qash.ai` |

## Authentication

All financial endpoints require the user's own QASH access token, obtained from [Verify login code](/api-reference/users/verify-otp):

```http theme={null}
Authorization: Bearer <user-access-token>
Content-Type: application/json
```

This is the same session token the QASH app itself uses. The token identifies both the user and your partner account — there is no `userId` field to pass and no `X-Api-Key` header on these calls. If you haven't logged the user in yet, see the [Partner Integration Guide](/guides/partner-integration).

## Endpoints

| Method | Endpoint                              | Description                                      |
| ------ | ------------------------------------- | ------------------------------------------------ |
| `GET`  | `/api/v1/user/accounts`               | List all accounts for the logged-in user         |
| `GET`  | `/api/v1/user/balance`                | List all accounts and balances                   |
| `POST` | `/api/v1/transactions/deposit`        | Create a payment link to fund the user's account |
| `GET`  | `/api/v1/transactions?accountId=<id>` | List transactions for an account                 |
| `GET`  | `/api/v1/transactions/:id`            | Get a single transaction                         |
| `POST` | `/api/v1/transactions/transfer`       | Transfer funds between Qash accounts             |
| `POST` | `/api/v1/user/payout`                 | Send funds to a bank account                     |
| `POST` | `/api/v1/user/exchange/calculate`     | Calculate an exchange rate quote                 |

## Currency and amount format

QASH currently supports a single account currency: **USDC**, pegged 1:1 to USD. Amounts are **decimal values, not smallest-unit integers** — send `100` for USDC 100.00, not `10000000`.

```json theme={null}
{ "toAccountId": 649, "amount": 100, "currency": "USDC" }
```

**Never use floating point arithmetic to compute an amount before sending it** — construct the decimal value directly and send it as a JSON number with at most the currency's precision.

<Note>
  Payout and exchange endpoints may involve other fiat currencies (e.g. COP) on the receiving side — see [Payout](/api-reference/financials/payout) and [Exchange rate quote](/api-reference/financials/exchange-calculate) for their specific amount conventions.
</Note>

## Account auto-provisioning

Every user gets a USDC account automatically the first time they log in — it's a side effect of wallet provisioning, not something you request. There is no endpoint to create an account manually. Call `GET /api/v1/user/accounts` after login to retrieve the account `id` before depositing.

## Common errors

| Status | Error                      | Cause                                                               |
| ------ | -------------------------- | ------------------------------------------------------------------- |
| `401`  | `Invalid or expired token` | Missing, expired, or malformed access token — log the user in again |
| `403`  | Ownership error            | The account or transaction doesn't belong to the token's user       |
| `429`  | —                          | Rate limit exceeded                                                 |
| `503`  | —                          | Downstream service unavailable                                      |
