Skip to content
API documentationP2P EasyPay

Get Merchant Balance ​

GET /v1/pay/balance

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"
}
FieldMeaning
available_minorFunds available now
pending_clearing_minorFunds still clearing or held
reserved_minorFunds reserved for withdrawals
as_ofBalance 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.

เอกสารชุดนี้อิงสัญญา API เวอร์ชัน 2026-08-01