- Home
- API reference
- Reports
- Get a statement
Get a statement
Lists pending or available balance movements for a period, with opening and closing balances.
/v1/reports/statementbalances:read permission.Query parameters
Section titled “Query parameters”accountstringoptionalThe balance the report is about: pending or available (the statement), or the balance a posting is on (the ledger).
Example: available
Possible values: pending, available
fromstringrequiredThe first day of the period, YYYY-MM-DD in Jakarta time. It is included.
Example: 2026-10-01
Pattern: ^\d{4}-\d{2}-\d{2}$
tostringrequiredThe last day of the period, YYYY-MM-DD in Jakarta time. It is included.
Example: 2026-10-26
Pattern: ^\d{4}-\d{2}-\d{2}$
Response (200)
Section titled “Response (200)”dataobjectrequiredThe returned object, or an array of objects for a list.
livemodebooleanrequiredtrue means this object belongs to live and can involve real payments; false means it belongs to the sandbox.
currencystringrequiredThe currency, an ISO 4217 code. Only IDR today.
Example: IDR
Value: IDR
accountstringrequiredThe balance the report is about: pending or available (the statement), or the balance a posting is on (the ledger).
Example: available
Possible values: pending, available
fromstringrequiredThe first day of the period, YYYY-MM-DD in Jakarta time. It is included.
Example: 2026-10-01
Pattern: ^\d{4}-\d{2}-\d{2}$
tostringrequiredThe last day of the period, YYYY-MM-DD in Jakarta time. It is included.
Example: 2026-10-26
Pattern: ^\d{4}-\d{2}-\d{2}$
opening_balanceintegerrequiredThe balance at the start of the period, in the smallest unit of currency (Rp125.000 is 12500000).
Example: 0
total_inintegerrequiredEverything that came in during the period, in the smallest unit of currency (Rp125.000 is 12500000).
Example: 3200000
total_outintegerrequiredEverything that went out during the period, in the smallest unit of currency (Rp125.000 is 12500000).
Example: 0
closing_balanceintegerrequiredThe balance at the end of the period: opening, plus in, minus out, in the smallest unit of currency (Rp125.000 is 12500000).
Example: 3200000
linesarray of objectrequiredThe movements or postings of the period, oldest first.
idstringrequiredThe id of the entry.
Example: string
typestringrequiredThe event that created this balance entry, such as payment_paid or payment_settled.
Example: payment_settled
Possible values: payment_paid, payment_settled, payment_settled_reversed, payment_paid_reversed, payment_reversed, payment_reversal_cancelled
payment_idstring | nullrequiredRelated payment; null when the event is not about a payment.
Example: pay_01k7q3m8x2v5t9n4b6c1d0e7fa
Prefixed with pay_.
directionstringrequiredin adds to the balance, out takes from it.
Example: in
Possible values: in, out
amountintegerrequiredThe amount of the entry, in the smallest unit of currency (Rp125.000 is 12500000).
Example: 993000
balance_afterintegerrequiredThe balance right after the entry, in the smallest unit of currency (Rp125.000 is 12500000).
Example: 3200000
occurred_atstringrequiredWhen it was posted (RFC 3339, UTC).
Example: 2026-10-26T03:04:05.000Z
Format: date-time
business_daystringrequiredThe Jakarta calendar day used to group this payment or balance entry, YYYY-MM-DD.
Example: string
metaobjectrequiredRequest details such as its id and pagination cursor.
request_idstringrequiredThe id of this request. Quote it when you ask support about it.
Example: req_Hy3k9QzT2LmN8vXa
A failed request answers with the common error shape; see Errors.
curl "https://api.baiyar.com/v1/reports/statement" \ -H "Authorization: Bearer $BAIYAR_KEY"{ "data": { "livemode": false, "currency": "IDR", "account": "available", "from": "2026-10-01", "to": "2026-10-26", "opening_balance": 0, "total_in": 3200000, "total_out": 0, "closing_balance": 3200000, "lines": [ { "id": "string", "type": "payment_settled", "payment_id": "pay_01k7q3m8x2v5t9n4b6c1d0e7fa", "direction": "in", "amount": 993000, "balance_after": 3200000, "occurred_at": "2026-10-26T03:04:05.000Z", "business_day": "string" } ] }, "meta": { "request_id": "req_Hy3k9QzT2LmN8vXa" }}