Skip to content
Hardcount
Run it locally
Pre-1.0 · one maintainer · Stripe and cards only · no SDKs (client libraries) yet · no production users yet. Docs describe v0.12.0 (30 Nov 2026) · What’s new →

The credit balance object

A customer’s credit balance in one currency and where that credit went. Every cent granted is either still in the balance or in one of the totals: total_granted = total_used + total_expired + total_retired + total_deducted + balance_cents. All amounts are in the currency’s minor unit (cents for USD).

{
"customer_id": "hc_cus_dakhnk2q3gpgqfoq5c0g",
"currency": "USD",
"balance_cents": 5000,
"total_granted": 5000,
"total_used": 0,
"total_expired": 0,
"total_retired": 0,
"total_deducted": 0
}
Field Type Always present What it means
customer_id string Yes The customer (hc_cus_…).
currency string Yes The currency of this balance, uppercase. Each credit ledger entry stores its own currency, and credit pays only invoices in that currency. A customer with credit in two currencies has two balances; they are never added together or converted.
balance_cents integer (int64) Yes The credit left: the sum of the customer’s ledger entries in this currency, in its minor unit (cents for USD). A grant past its expiry still counts here until the expiry run writes it off.
total_granted integer (int64) Yes Every credit added, in the currency’s minor unit: grants, positive adjustments, and credit a void or credit note gave back as new credit. Credit a void or credit note put back on the grant it was drawn from is not added again.
total_used integer (int64) Yes Credit applied to invoices, less what a void or credit note put back on the grant it was drawn from, in the currency’s minor unit.
total_expired integer (int64) Yes Credit written off by expiry, in the currency’s minor unit.
total_retired integer (int64) Yes Prepaid commit credit taken back because the invoice that funded it was refunded by a credit note, in the currency’s minor unit.
total_deducted integer (int64) Yes Credit a dashboard user or an API key deducted (a negative adjustment), in the currency’s minor unit.

Stuck, or found a bug? Ask in Discussions · Open an issue