Skip to main content
Retrieves the credit transaction ledger for a customer, showing all credits and debits.

Query

query GetCreditLedger($input: CreditLedgerInput!) {
  creditsLedger(input: $input) {
    edges {
      node {
        id
        amount
        type
        description
        createdAt
        balanceAfter
      }
      cursor
    }
    pageInfo {
      hasNextPage
      endCursor
    }
    totalCount
  }
}

Parameters

input
CreditLedgerInput
required
Input parameters for credit ledger query

Return Type

Returns a CreditLedgerConnection with ledger entries.

Ledger Entry Fields

FieldTypeDescription
idUUIDEntry ID
amountFloatTransaction amount (+/-)
typeStringCREDIT or DEBIT
descriptionStringTransaction description
createdAtDateTimeTransaction time
balanceAfterFloatBalance after transaction

Overdraft settlement event types

The credit ledger includes the following event types related to overdraft settlement:
Event TypeDescription
CREDITS_CONSUMPTION_TRANSFER_SOURCERecorded on the overdraft grant when consumed credits are transferred out during settlement. Shows a negative quantity (reduction in consumed amount).
CREDITS_CONSUMPTION_TRANSFER_TARGETRecorded on the new grant when consumed credits are transferred in during settlement. Shows a positive quantity (increase in consumed amount).
These events always appear in pairs — one on the source (overdraft) grant and one on the target (new) grant — with matching quantities.

Common Use Cases

Show detailed credit transaction history to customers.
Maintain audit trail of all credit movements.
Analyze credit consumption patterns.