Ledger

Tenant-wide ledger

Lists double-entry ledger entries across the whole workspace, newest first, with cursor pagination. Filter by category, end user, initiator, provider and endpoint, creation window, attribution keys, ledger event kind, or the pooled platform account.

get/credits/ledger

Request

  • Base URL
    https://api.paywithlocus.com/api
  • URL
    https://api.paywithlocus.com/api/credits/ledger
  • Auth
    • HTTP bearer
    • or HTTP bearer

Query parameters

category'TOPUP' | 'BURN' | 'REFUND' | 'CLAWBACK' | 'FEE' | 'ADJUSTMENT' | 'ALLOCATION' | 'PROMO'
externalUserIdstring

Case-sensitive immutable ID in the tenant namespace. Prefer an identity-provider subject, not an email address.

initiatorstring

Spender reference <type>:<id>, matching the analytics initiator identity. Cannot be combined with externalUserId or account=platform; unattributed is not filterable.

providerstring

Matches the provider recorded on the ledger entry. Legacy entries without provider metadata are excluded from this filtered ledger view.

endpointstring

metadata.endpoint equality. Requires provider.

createdAfterstring date-time

Inclusive lower bound. Strict ISO-8601.

createdBeforestring date-time

Exclusive upper bound. Strict ISO-8601.

attribution.{key}string

Equality filter on metadata.attribution.<key>, one query parameter per key: attribution.entityId=acct_889. Dot form only — bracket form is not parsed.

sourceKeystring

Narrow to one ledger event kind, e.g. wapi_burn or stripe_topup.

account'platform'

Restrict to the tenant's pooled platform account. Mutually exclusive with externalUserId and with an end-user initiator.

cursorstring
limitinteger

Response

Ledger page

successtrue required
nextCursorstring nullable required
appliedFiltersstring[] required

Names of the narrowing query filters this server applied. An empty array means the request did not include a narrowing filter.

Changes

No recorded changes to this operation across all 1 revision of this API.