- Home
- API reference
- Reports
- Get the ledger
Get the ledger
Lists debit and credit entries posted to pending, available and reserved balances during a period.
/v1/reports/ledgerbalances:read permission.Query parameters
Section titled “Query parameters”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
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}$
total_debitintegerrequiredThe sum of the debits of the period, in the smallest unit of currency (Rp125.000 is 12500000).
Example: 5000000
total_creditintegerrequiredThe sum of the credits of the period, in the smallest unit of currency (Rp125.000 is 12500000).
Example: 5000000
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_.
accountstringrequiredThe balance the posting is on: pending, available or reserved.
Example: pending
Possible values: pending, available, reserved
sidestringrequiredThe accounting side posted to this balance. Read it together with account; debit and credit totals balance across the ledger.
Example: credit
Possible values: debit, credit
amountintegerrequiredThe amount of the entry, in the smallest unit of currency (Rp125.000 is 12500000).
Example: 993000
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/ledger" \ -H "Authorization: Bearer $BAIYAR_KEY"{ "data": { "livemode": false, "currency": "IDR", "from": "2026-10-01", "to": "2026-10-26", "total_debit": 5000000, "total_credit": 5000000, "lines": [ { "id": "string", "type": "payment_settled", "payment_id": "pay_01k7q3m8x2v5t9n4b6c1d0e7fa", "account": "pending", "side": "credit", "amount": 993000, "occurred_at": "2026-10-26T03:04:05.000Z", "business_day": "string" } ] }, "meta": { "request_id": "req_Hy3k9QzT2LmN8vXa" }}