Complete the quickstart and obtain the current Customer's short-lived session. History reads additionally require credits:read.
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
Before you start
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.
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: {},});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 | HTTP | Permission |
|---|---|---|
| readHoldings | POST /api/v1/customer-holdings | entitlements:read |
| readLedger | POST /api/v1/customer-ledger | credits: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.