Get Merchant Balance
GET /
js
import { clientFromEnv } from './client.mjs';
const client = clientFromEnv();
const result = await client.balance();
if (!result.ok) throw new Error(result.data?.error?.code ?? 'api_error');
const availableMinor = result.data.available_minor;Example response:
json
{
"livemode": true,
"available_minor": 100000,
"pending_clearing_minor": 20000,
"reserved_minor": 10000,
"currency": "THB",
"as_of": "2026-10-19T12:00:00.000Z"
}| Field | Meaning |
|---|---|
available_minor | Funds available now |
pending_clearing_minor | Funds still clearing or held |
reserved_minor | Funds reserved for withdrawals |
as_of | Balance read time in UTC |
Amounts are satang: 100000 means THB 1,000. Your key needs wallet:read. The Sandbox hostname returns the test-mode balance; read its actual livemode value. GET uses neither a body nor an Idempotency-Key.
PHP and balance history
php
$result = $client->balance();
$availableMinor = $result['data']['available_minor'];Use balance history for reconciliation. This endpoint reads the latest balance; an old webhook snapshot should not replace it.