Skip to main content
Product-credit values are exact decimal strings. Do not convert balances, transfer amounts, or deductions to JavaScript number when precision matters.

List credit systems

list() fetches every active page and returns normalized camel-case CreditSystem objects.

Customer balances

CreditBalance includes credit-system metadata, available, an as_of timestamp, and ordered balance sources. Sources identify their type, initial and remaining amounts, validity window, priority, scope, and transfer flags.

Customer operation history

limit must be an integer from 1 to 100. Operations expose exact credit amounts, status, reason, rate snapshot, event time, and source allocations.

Entity balances

pool_policy is entity_only, entity_then_customer, customer_only, or null when no policy applies.

Entity operation history

Allocate credits

Transfers require a secret key, a positive decimal string with at most 12 decimal places, and an idempotency key.

Deallocate credits

Transfers are subject to Nozle’s exact transfer policy and source eligibility rules. Retry an uncertain transfer with the same key and payload.

Advisory usage check

usage.check() does not reserve or mutate credits. Another request can spend the projected sources before a later consume request.

Atomic usage tracking

usage.track() atomically evaluates the metric conversion, selects eligible sources, deducts credits, and records the operation. The optional Entity ID enables Entity attribution and configured pool policy.

Legacy wallet adapter

nozle.checkAndDeduct({ customerId, feature, credits }) remains available for the legacy wallet path. New product-credit integrations should use usage.check() and usage.track().

Security

Keep credit reads and all mutations behind authenticated backend routes. Derive customer and Entity IDs from server-owned identity data and return only fields the browser needs.