Skip to content
Indiana
Dashboard
Docs
Browse docs / Customer state & history

Customer state & history

Build an account UI with exact balances, plan eligibility, state subscriptions and paginated history.

SDK examples target the current API. Check matching SDK versions and HTTP alternatives

API v1Updated

Before you start

Complete the quickstart and obtain the current Customer's short-lived session. History reads additionally require credits:read.

Read current customer holdings and ledger

Complete host authentication, obtain the current user’s token and call grow.identify. Browser requests omit customer IDs. These reads use the same memberships, balances and verified transactions as screen components. Data remains private and is not cached as public design.

Quantities, balances and rates are decimal strings. Filtering applies to all history before paging with a cursor that preserves microseconds and entry type. Quotes do not charge. Consumption, reservation, confirmation, release and original-price refunds execute only on the trusted backend.

Backend mutations require credits:consume; refunds also require credits:manage. Quotes, ledger and holdings respectively require credits:read, credits:read and entitlements:read. Current balance execution is available only in the explicit Sandbox scope.

app/account.tsTypeScript
const { holdings } = await grow.readHoldings();const { ledger } = await grow.readLedger({  type: null, from: null, to: null, after: null, limit: 50,});// Read the next page with ledger.nextCursor; preserve the entire cursor.const { quote } = await grow.quoteBalance({  operation: "quote", internal_feature_id, quantity: "1", properties: {},});
server/usage.tsTypeScript
const { receipt } = await indiana.mutateBalance({  customerId: verifiedCustomer.id,  command: {    operation: "consume", internal_feature_id, quantity: "1", properties: {},    idempotencyKey: `job:${job.id}`,  },});// Retry the same job with its original idempotencyKey and input.

HTTP operations

Use these operations with your HTTP integration. Each reference includes complete request/response fields and credential requirements; SDK snippets are an alternative when a matching SDK is available.

Operation and permission
OperationHTTPPermission
readHoldingsPOST /api/v1/customer-holdingsentitlements:read
readLedgerPOST /api/v1/customer-ledgercredits:read

Operation and permission

  • readHoldings

    HTTP
    POST /api/v1/customer-holdings
    Permission
    entitlements:read
  • readLedger

    HTTP
    POST /api/v1/customer-ledger
    Permission
    credits:read

Related:readHoldings·readLedger

Check your result

Expected outcome

The account UI distinguishes loading, empty holdings, available access and failure. Clear data on account changes and retain server pagination cursors.