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

Common Use Cases

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