A ledger entry is the lowest-level, immutable record of a single movement of credit grants against one grant block. While a ledger operation represents the business action (for example, a capture or authorize), each operation is expanded internally into one or more ledger entries that describe exactly how individual grant blocks were affected.
Behavior
- Ledger entries are immutable once recorded.
- A single ledger operation can generate multiple entries. When a capture (or other consumption) spans several grant blocks, a ledger entry is created corresponding to each grant block, reflecting the amount captured from that grant block.
- The
typefield conveys the direction of each movement;amountis always positive.
Usage
Ledger entries provide the granular, per-grant-block audit trail.
Sample Ledger entryJSON
API Index URL
Ledger entries attributes
A unique, immutable identifier for the subscription against which this ledger entry was recorded.
The account this entry belongs to: provisioned (credit grants issued per the plan, consumed first) or overdraft (consumption beyond the configured credit grants, after the provisioned account is exhausted).
Stores the credit grants given as per the plan configuration. Consumption of credit grants is first done through this account.
Allows consumption beyond the configured credit grants. Used once the credit grants in the provisioned account are exhausted.
The number of credit grants moved by this entry against a single grant block.
Returned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).
Behavior
- Always a positive value; the direction of the movement is conveyed by
type.
The account balance (provisioned or overdraft, matching account_type) immediately before this ledger entry was applied.
Returned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).
The account balance (provisioned or overdraft, matching account_type) immediately after this ledger entry was applied.
Returned as a decimal string. Maximum supported value: 9999999999999999999999999.9999999999 (up to 25 digits before the decimal and up to 10 digits after).
Specifies the direction of the movement of credit grants recorded by this entry.
Credit grants added when a grant block is allocated.
Credit grants consumed from a grant block.
Credit grants reserved on a grant block by an authorize operation, moved from usable balance to hold amount.
Credit grants released allowing the amount to go from hold amount back to the usable amount via release_authorization or the auto-release job.
Identifier of the ledger operation that produced this entry. Multiple
entries can share the same ledger_operation_id when a single operation spans more than one grant block
or produces more than one movement.
Identifier of the grant block this entry acts upon.