/credits/check and /credits/track draws. Use this page to create grants through the API or dashboard, to control which charges a grant may pay for, and to read what is left. The rules for how credit is drawn are on Credit Consumption; the difference between grants and wallets is on the overview.
Create a grant
Via API
Credits are granted against a subscription.amount and reason are required; credit_type defaults to monetary; expires_at is optional. See Grant credits to a subscription.
account.credits.granted webhook.
From the dashboard
- Open Customers, select the customer, and open the Credits card — or the Credits & Entitlements section of one of their subscriptions.
- Click Add Credits.
- Fill in the grant:
- Click Add Credits.
credit_allocation entitlement on the plan or subscription, which creates an allocation grant each period.
Grant types
Monetary
- Denominated in the subscription’s currency; never converted.
- Applied while the invoice is priced, reducing
amount_remaining; shown as applied credit on the invoice. - Reported by
GET /subscriptions/{id}/credits/balance.
Units
- Denominated in metric units, not currency, and tracked separately from the monetary balance.
- Cover metered lines at invoice time, and realtime draws when gate funding is on.
- Reported on the
balancesof a/credits/checkor/credits/trackresponse.
Product and price filters
A grant (or a subscription’s credit allocation) can be restricted to specific products or prices with include and exclude rules. In the dashboard this is the Applies to / Configure Credit Filters dialog on the credit entitlement.Realtime gate funding
Whether a grant pays for realtime/check and /track draws is a separate setting on the grant, expressed in billable metrics — the only thing the gate resolves. A product can sit above several metrics, which is why invoice-time filters cannot answer this question.
Naming a metric that has no active credit consumption configuration is allowed and returns a warning: the grant saves, and that part of the filter funds nothing until the configuration exists. Gate funding is a dashboard setting; the API grant endpoint creates grants with funding
off.
Grant origin
grant_type records how a grant came about:
A grant has no status field. It is spendable from its creation until
expires_at. A subscription version change can void an allocation’s remaining grant, depending on the transition policy set for that change — see Entitlements.
Expiration
expires_at is optional. Expired grants drop out of the balance from that moment; because the balance is evaluated at a point in time, a backdated charge can still draw on a grant that was live when the work happened.
Consumption order
When several grants can pay for the same charge they are drawn in this order:- Priority — lowest number first
- Expiring grants before non-expiring ones
- Earliest expiry first
- Oldest grant first
0. Set it on the allocation when allowance credit should be consumed ahead of purchased credit. Examples on Credit Consumption.
Read balances
Monetary balance via API
GET /subscriptions/{id}/credits/balance returns the customer’s monetary credit balance applicable to that subscription, evaluated at as_of (default: now). Expired grants are excluded. See Get the monetary credit balance.
Unit balances
Unit balances are not reported by the endpoint above. Realtime unit availability comes back on thebalances array of a /credits/check or /credits/track response, per metric — see Credit Consumption. A /credits/check with no reserve is a free way to read it.
Dashboard
Customers → [Customer] → Credits shows the balance by type, the grants behind it, and recent ledger activity.Common scenarios
Service credit for an outage
Python
Prepaid usage package
Python
Next steps
Credit Consumption
How credit is drawn at invoice time and at the gate.
Entitlements
Recurring credit allocations on plans.
Wallets
Prepaid money balances.
How Alguna Works
Credits in the quote-to-cash chain.