Skip to content

Get the ledger

Lists debit and credit entries posted to pending, available and reserved balances during a period.


GET/v1/reports/ledger
Requires balances:read permission.
fromstringrequired

The 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}$

tostringrequired

The 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}$

dataobjectrequired

The returned object, or an array of objects for a list.

livemodebooleanrequired

true means this object belongs to live and can involve real payments; false means it belongs to the sandbox.

currencystringrequired

The currency, an ISO 4217 code. Only IDR today.

Example: IDR

Value: IDR

fromstringrequired

The 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}$

tostringrequired

The 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_debitintegerrequired

The sum of the debits of the period, in the smallest unit of currency (Rp125.000 is 12500000).

Example: 5000000

total_creditintegerrequired

The sum of the credits of the period, in the smallest unit of currency (Rp125.000 is 12500000).

Example: 5000000

linesarray of objectrequired

The movements or postings of the period, oldest first.

idstringrequired

The id of the entry.

Example: string

typestringrequired

The 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 | nullrequired

Related payment; null when the event is not about a payment.

Example: pay_01k7q3m8x2v5t9n4b6c1d0e7fa

Prefixed with pay_.

accountstringrequired

The balance the posting is on: pending, available or reserved.

Example: pending

Possible values: pending, available, reserved

sidestringrequired

The 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

amountintegerrequired

The amount of the entry, in the smallest unit of currency (Rp125.000 is 12500000).

Example: 993000

occurred_atstringrequired

When it was posted (RFC 3339, UTC).

Example: 2026-10-26T03:04:05.000Z

Format: date-time

business_daystringrequired

The Jakarta calendar day used to group this payment or balance entry, YYYY-MM-DD.

Example: string

metaobjectrequired

Request details such as its id and pagination cursor.

request_idstringrequired

The 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"