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", entitlementId, quantity: "1", properties: {},});const { receipt } = await groove.mutateBalance({ customerId: verifiedCustomer.id, command: { operation: "consume", entitlementId, quantity: "1", properties: {}, idempotencyKey: `job:${job.id}`, },});// Retry the same job with its original idempotencyKey and input.