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

# Wallets

> Discover your wallets and check balances via the LauncX V3 wallet API.

Discover your wallet IDs and check their current balances. All endpoints require the standard `x-api-key` + `x-timestamp` headers — see [Authentication](/authentication).

The client is identified by your API key — there is no `client_id` parameter, and you can only see your own wallets.

Typical flow: **list wallets → get balance → [create a disbursement](/disbursements)**.

## 1. List wallets

`GET /api/v3/wallets`

Returns all of your wallets. Use the returned `wallet_id` as `client_wallet_id` when [creating a disbursement](/disbursements#3-create-a-disbursement), and as the `wallet_id` path parameter in [Get wallet balance](#2-get-wallet-balance) and [List available banks](/disbursements#1-list-available-banks).

```bash theme={null}
curl https://live.launcx.com/api/v3/wallets \
  -H "x-api-key: {{your-v3-api-key}}" \
  -H "x-timestamp: {{unix_timestamp_in_milliseconds}}"
```

### Response

```json theme={null}
{
  "wallets": [
    {
      "wallet_id": "3f1d6c2a-1b2c-4d5e-8f90-aabbccddeeff",
      "name": "LX-100"
    },
    {
      "wallet_id": "9a8b7c6d-5e4f-4a3b-9c2d-112233445566",
      "name": "LX-101"
    }
  ],
  "total_count": 2
}
```

| Field                 | Type          | Notes                                      |
| --------------------- | ------------- | ------------------------------------------ |
| `wallets[].wallet_id` | string (UUID) | Use in disbursement and balance endpoints. |
| `wallets[].name`      | string        |                                            |
| `total_count`         | integer       | Equals the number of items in `wallets`.   |

If your account has no wallets yet, the response is `200 OK` with `"wallets": []` and `"total_count": 0` — not an error.

## 2. Get wallet balance

`GET /api/v3/wallets/{wallet_id}/balance`

Returns the current balance of one wallet. The wallet must belong to your client; otherwise `404`.

```bash theme={null}
curl https://live.launcx.com/api/v3/wallets/{{wallet_id}}/balance \
  -H "x-api-key: {{your-v3-api-key}}" \
  -H "x-timestamp: {{unix_timestamp_in_milliseconds}}"
```

### Response

```json theme={null}
{
  "wallet_id": "3f1d6c2a-1b2c-4d5e-8f90-aabbccddeeff",
  "name": "LX-100",
  "balance": "150000.0000"
}
```

| Field       | Type             | Notes                                         |
| ----------- | ---------------- | --------------------------------------------- |
| `wallet_id` | string (UUID)    |                                               |
| `name`      | string           |                                               |
| `balance`   | string (decimal) | 4 fraction digits, in `IDR`. Can be negative. |

<Warning>
  `balance` is a **decimal string** — parse it with a decimal type, never as a float. Floating-point rounding on money values will cause reconciliation mismatches.
</Warning>

## 3. Errors

| Status | When                                                                                                                                     |
| ------ | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `400`  | Invalid `wallet_id` (not a UUID), or missing/invalid/stale `x-timestamp` (must be within ±5 minutes of server time).                     |
| `401`  | Missing or invalid `x-api-key`.                                                                                                          |
| `404`  | `wallet not found` — the wallet does not exist, does not belong to your client, or is not fully provisioned yet (balance endpoint only). |
| `500`  | Internal error — retry, then contact support.                                                                                            |

If you get a `404` for a wallet ID you believe is yours, re-check it against [List wallets](#1-list-wallets).
