API reference Customers & access Read customer ledger POST /api/v1/customer-ledger
Query verified financial facts by type and date across history.
API v1 Updated Oct 16, 2026
On this page
Make the request Query verified financial facts by type and date across history.
Credential Server API key or customer token. Customer calls cannot select another customer.
Permission credits:readSet the base URL and App ID from SDK setup. These examples use placeholders and do not execute requests. Never put a server key in browser code.
1 curl -X POST "$INDIANA_BASE_URL/api/v1/customer-ledger" \2 -H "Authorization: Bearer $INDIANA_CUSTOMER_TOKEN" \ 3 -H "X-Indiana-Project: $INDIANA_PROJECT_ID" \ 4 -H "X-Indiana-Protocol: 0.5" \ 5 -H "X-Indiana-Environment: sandbox" \ 6 -H "Content-Type: application/json" \ 7 -d '{ 8 "query" : { 9 "type" : null, 10 "from" : null, 11 "to" : null, 12 "after" : null, 13 "limit" : 50 14 } 15 } '
The response tab lists field types, not an example payload. Actual values depend on customer state.
Request parameters JSON body customerIduuid Optional Indiana customer ID mapped from a verified identity on the server. Omit for customer-token calls, which use the token-bound customer.
queryobject Required The query value for this operation. Its accepted type and constraints are listed above and below.
Show child fieldstypeenum | null Required The type value for this operation. Its accepted type and constraints are listed above and below.
resourceKeystring Optional Resource identifier returned by balances: a feature key for independent allowances, or pool:<poolId> for pools.
minLength: 1 · pattern: ^[a-zA-Z0-9_-]+$
kindenum Optional The kind value for this operation. Its accepted type and constraints are listed above and below.
Show allowed values"purchase""refund"
topupboolean Optional The topup value for this operation. Its accepted type and constraints are listed above and below.
fromdate | null Required The from value for this operation. Its accepted type and constraints are listed above and below.
todate | null Required The to value for this operation. Its accepted type and constraints are listed above and below.
afterobject | null Required The after value for this operation. Its accepted type and constraints are listed above and below.
Show child fieldsatdate-time Required The at value for this operation. Its accepted type and constraints are listed above and below.
iduuid Required The id value for this operation. Its accepted type and constraints are listed above and below.
typeenum Required The type value for this operation. Its accepted type and constraints are listed above and below.
Show allowed values"source""usage""transaction""invoice""debt""settlement"
limitinteger Required Maximum records per page, subject to the contract limit.
min: 1 · max: 50
Response fields Successful responses include requestId and scope. Use the actual business status or accepted field to determine the result. Optional fields are omitted when unavailable.
HTTP 200 · application/json requestIduuid Required Server-generated HTTP request UUID. Include it when reporting a failed request.
scopeobject Required The App and environment of this response. Headers only verify scope; they cannot switch key scope.
Show child fieldsprojectIdstring Required App ID bound to the credential.
minLength: 1
environmentenum Required Separate data scope: sandbox or live.
Show allowed values"sandbox""live"
ledgerobject Required The ledger value for this operation. Its accepted type and constraints are listed above and below.
Show child fieldscustomerIduuid Required Indiana customer ID mapped from a verified identity on the server. Omit for customer-token calls, which use the token-bound customer.
rowsarray Required The rows value for this operation. Its accepted type and constraints are listed above and below.
maxItems: 50
Show child fieldsiduuid | uuid | uuid | uuid | uuid | uuid Required The id value for this operation. Its accepted type and constraints are listed above and below.
occurredAtdate-time | date-time | date-time | date-time | date-time | date-time Required The occurredAt value for this operation. Its accepted type and constraints are listed above and below.
type"invoice" | "source" | "usage" | "transaction" | "debt" | "settlement" Required The type value for this operation. Its accepted type and constraints are listed above and below.
statusstring | enum Optional The status value for this operation. Its accepted type and constraints are listed above and below.
paidstring Optional The paid value for this operation. Its accepted type and constraints are listed above and below.
pattern: ^(0|[1-9]\d{0,17})(\.\d{1,12})?$
refundedstring Optional The refunded value for this operation. Its accepted type and constraints are listed above and below.
pattern: ^(0|[1-9]\d{0,17})(\.\d{1,12})?$
currencyenum | enum | null Optional Currency code supported by the published price.
externalIdstring | null Optional The externalId value for this operation. Its accepted type and constraints are listed above and below.
internal_feature_iduuid | uuid | uuid | uuid Optional The internal_feature_id value for this operation. Its accepted type and constraints are listed above and below.
keystring | string | string Optional The key value for this operation. Its accepted type and constraints are listed above and below.
namestring | string | string | string Optional Display name of the customer or object; not an identity key.
kindenum | enum | enum | enum | enum Optional The kind value for this operation. Its accepted type and constraints are listed above and below.
reasonenum | enum | null Optional Rejection reason or ledger operation description; interpret with accepted and status.
quantitystring | object Optional Use the declared field type for business quantity. Credit operations use decimal strings to avoid floating-point error. quote/reserve/confirm/refund require positive quantities; consume can record zero-cost events.
unlimitedboolean Optional The unlimited value for this operation. Its accepted type and constraints are listed above and below.
startsAtdate-time Optional The startsAt value for this operation. Its accepted type and constraints are listed above and below.
expiresAtdate-time | null | date-time | null Optional ISO 8601 UTC expiry. Expired sessions and reservations cannot be reused.
orderIduuid | null | uuid Optional The orderId value for this operation. Its accepted type and constraints are listed above and below.
parentSourceIduuid | null Optional The parentSourceId value for this operation. Its accepted type and constraints are listed above and below.
originalIduuid | null | uuid | null Optional The originalId value for this operation. Its accepted type and constraints are listed above and below.
acceptedboolean Optional Whether business rules accepted the operation. HTTP 200 does not imply accepted is true.
propertiesobject Optional Validated pricing properties used to match dimensions and multipliers.
reservationStatusenum | null Optional The reservationStatus value for this operation. Its accepted type and constraints are listed above and below.
chargesarray Optional The charges value for this operation. Its accepted type and constraints are listed above and below.
maxItems: 500
Show child fieldsfunding"balance" | "unbilled" | "prepaid" | "postpaid" Required The funding value for this operation. Its accepted type and constraints are listed above and below.
sourceIduuid Optional The sourceId value for this operation. Its accepted type and constraints are listed above and below.
rolloverIduuid | null Optional The rolloverId value for this operation. Its accepted type and constraints are listed above and below.
unitsstring | string | object Optional The units value for this operation. Its accepted type and constraints are listed above and below.
amountstring | string Optional Credit or ledger amount, using the field’s decimal-string or integer type.
internal_feature_iduuid Optional The internal_feature_id value for this operation. Its accepted type and constraints are listed above and below.
keystring Optional The key value for this operation. Its accepted type and constraints are listed above and below.
minLength: 1 · pattern: ^[a-zA-Z0-9_-]+$
namestring Optional Display name of the customer or object; not an identity key.
minLength: 1 · maxLength: 120
kindenum Optional The kind value for this operation. Its accepted type and constraints are listed above and below.
Show allowed values"access""metered""credit"
invoiceIduuid Optional The invoiceId value for this operation. Its accepted type and constraints are listed above and below.
invoiceLineIduuid Optional The invoiceLineId value for this operation. Its accepted type and constraints are listed above and below.
authorizationIduuid Optional The authorizationId value for this operation. Its accepted type and constraints are listed above and below.
currencyenum Optional Currency code supported by the published price.
Show allowed values"USD""EUR""CNY""GBP""JPY""CAD""AUD""NZD""CHF""HKD""SGD""KRW""INR""BRL""MXN""TWD""THB""IDR""MYR""PHP""VND""ZAR""AED""SAR""SEK""NOK""DKK""PLN""CZK""HUF""ILS""TRY""RON"
purposeenum Optional The purpose value for this operation. Its accepted type and constraints are listed above and below.
Show allowed values"product""invoice"
productVersionIduuid | null Optional The productVersionId value for this operation. Its accepted type and constraints are listed above and below.
productNamestring | null Optional The productName value for this operation. Its accepted type and constraints are listed above and below.
productVersioninteger | null Optional The productVersion value for this operation. Its accepted type and constraints are listed above and below.
invoiceIduuid | null Optional The invoiceId value for this operation. Its accepted type and constraints are listed above and below.
amountMinorinteger | null Optional The amountMinor value for this operation. Its accepted type and constraints are listed above and below.
sourceIduuid | uuid Optional The sourceId value for this operation. Its accepted type and constraints are listed above and below.
transactionIduuid Optional Ledger transaction UUID from the original consumption, referenced by a refund.
amountstring | string Optional Credit or ledger amount, using the field’s decimal-string or integer type.
debtIduuid Optional The debtId value for this operation. Its accepted type and constraints are listed above and below.
nextCursorobject | null Required Next-page cursor; null means end. Pass unchanged and clear when filters change.
Show child fieldsatdate-time Required The at value for this operation. Its accepted type and constraints are listed above and below.
iduuid Required The id value for this operation. Its accepted type and constraints are listed above and below.
typeenum Required The type value for this operation. Its accepted type and constraints are listed above and below.
Show allowed values"source""usage""transaction""invoice""debt""settlement"
Handle errors Common failures Code Recovery UNAUTHENTICATED Verify the key or refresh the expired customer token once. FORBIDDEN Check current key permissions and customer access. INVALID_REQUEST Check field types, UUIDs, decimal strings and mutually exclusive fields. SCOPE_MISMATCH Use the App and environment bound to the credential.
Common failures
UNAUTHENTICATED
Recovery Verify the key or refresh the expired customer token once. FORBIDDEN
Recovery Check current key permissions and customer access. INVALID_REQUEST
Recovery Check field types, UUIDs, decimal strings and mutually exclusive fields. SCOPE_MISMATCH
Recovery Use the App and environment bound to the credential. Related:All request and error conventions · Back to endpoint index