ResourcesCredits

Overview

Configure credits products and manage customer unit balances with an auditable ledger.

Credits products sell integer usage units such as API calls, AI tokens, or game currency. Each dedicated credits product owns exactly one default CREDITS variant and can define ordered, non-overlapping rate tiers.

Customer balances are isolated by store, customer, and credits product. Grants, consumption, and administrative adjustments are atomic and append an immutable ledger entry. Supply an idempotency_key for every transaction: an identical replay returns the existing entry, while conflicting reuse is rejected.

All credit quantities and balances are integers. Base prices use integer minor currency units in price_cents. Exact tier unit prices remain decimal strings with at most four decimal places and must never be sent as JSON floats.

The product endpoints require the listing API ability. Balance and transaction endpoints require the credit API ability and Credit team permission.

Endpoints

On this page