comecerodocs
Usage billing

Credit units and purchases

Configure a credit unit, publish currency rates, price metered usage, and follow quoted purchases through payment, posted balances, refunds, and receipts.

Open Usage billing > Credits to set up credit balances. Every shop can use Credits. Money balances work without a custom unit.

Configure a unit

Choose the unit name and singular and plural labels. Publish a conversion for each settlement currency. For example, 1,000 credits can represent 10.00 USD with a rate of 0.01 USD per credit.

Review each rate before publishing. Rates are immutable versions. New rates apply to new agreements. Existing agreements retain their saved rate and labels. The rate and its reciprocal must both be exact decimals with at most six places.

See Get credit unit, Save credit unit, and Publish currency rate.

Price and fund usage

In Prices, select Money or a published credit rate. Credit prices are before tax. Core compiles the corresponding currency prices using the saved conversion. The unit price editor does not offer a local bill calculator.

An agreement pins one credit rate. All usage agreements contributing to a subscription regular billing period must use Money or that exact same credit rate for the whole period. A scheduled successor cannot introduce a different rate partway through that period.

Open the customer agreement to create a balance, select the meters that draw from it, and optionally give initial credit. An empty meter selection creates an unlinked balance. Setup and term changes use the agreement's credit revision and a whole UTC effective hour.

For non-volume sum meters, a future hour can be used. Volume pricing and gauge or latest meters require the next regular billing boundary. Prepared work and protected subscription boundaries can prevent a change. Correct the conflict and retry the same request only if its body is unchanged.

See Set up credit and Change usage terms.

Buy a quantity

Shoppers enter a credit quantity and review its principal, tax, total, currency, and expiry. Accepting the quote opens a dedicated invoice. Paying uses the existing invoice payment flow. Tax is not added to the credit balance.

Quotes expire after five minutes. Changed terms require a new review. Retrying with the same idempotency key and body replays the original result. Use a new key for a different request.

This release supports direct quantities at face value. Named pack catalogs, discounts, bonus credits, recurring included allocations, and automatic top-up of credit units are not available. Money automatic top-up requires operational availability, a supported saved card, and the shopper's consent. It runs periodically.

See Quote credit quantity and Buy prepaid credit.

Follow the balance

Posted history follows ledger recording order. An adjustment recorded today does not rewrite yesterday's posted closing balance. The posted chart is separate from estimated unbilled usage and held principal. Check completeness and the timestamp before using an estimate. An unavailable estimate is not zero.

Payment success alone does not prove fulfillment. Invoices and related payments report awaiting payment, pending, fulfilled, held, or refunded. Only a complete fulfilled result confirms the ledger grant. Pending or held purchases should be checked again or referred to the shop.

Refund eligibility checks unused credit against outstanding usage of the original purchase source. An unavailable result has null maxima. An available maximum is an estimate that the refund operation checks again. Partial reversals can coexist with fulfilled status. Invoices and receipts retain the saved unit summary and currency totals.

See Get posted history.

On this page