8 min read
Prepaid Credits for SaaS and AI: How Credit Burndown Billing Works
How to sell prepaid credit for an AI or API product and draw it down as customers use it: the burndown order, a worked example, hard and soft limits, and adding credit safely.

In short
Prepaid credit lets a customer pay up front and use it over time: a 100 USD starter pack, a top-up, or a credit you give after an outage. When a billing period closes, usage is paid in a fixed order: the plan's included allowance first, then prepaid credit, and only then is the rest charged on the invoice. In Comecero, credit is added with an idempotency key so it can never be added twice, it never goes below zero, and every top-up and drawdown is recorded.
Why sell prepaid credit?
Credit suits products where customers want control of spend or you want cash before cost:
- Developer and API products, where buyers top up before they build.
- AI apps, where model costs land before the invoice does.
- Agencies and teams that buy a budget for a project.
- Goodwill, when you want to give credit back after an incident without refunding a payment.
Customers like it because the spend is capped by what they bought. You like it because the cash arrives first.
What is credit burndown?
Burndown is the order in which a period's usage is paid. In Comecero it is always:
- Included allowance. Usage up to what the plan includes is free.
- Prepaid credit. The price of the usage above the allowance is taken from the customer's credit, as far as the balance goes.
- Charge. Whatever credit did not cover goes on the invoice and is charged with the saved payment method, usually on the subscription's renewal invoice.
Credit pays only for periods its dates overlap. When one credit funds several metrics, they draw on it in a fixed order, so the result is always the same.
A worked example
The plan includes 100,000 tokens each month, then charges 0.00002 USD per token. The customer has 5.00 USD of credit and uses 500,000 tokens this month.
| Step | Amount |
|---|---|
| Tokens used | 500,000 |
| Included allowance | 100,000 tokens, free |
| Billable tokens | 400,000 |
| Price: 400,000 × 0.00002 USD | 8.00 USD |
| Taken from credit | 5.00 USD (balance now 0.00) |
| Charged on the renewal invoice | 3.00 USD |
If the customer had 8.00 USD or more of credit, nothing would be charged for usage and no usage line would be added to the invoice.
Soft limit or hard limit?
What happens when credit runs out is your choice, per customer and metric:
| Policy | Works like | When credit and allowance are used up |
|---|---|---|
allow (default) |
Soft limit | The rest is charged on the invoice |
block |
Hard limit | Nothing is charged. The bill waits until the customer adds credit |
Credit is used when a period is billed, not when each event arrives, so the meter keeps counting at a zero balance and no usage is ever lost. To stop use inside your app before the limit, follow usage so far and the usage:threshold_reached webhook, which fires at 50%, 80% and 100% of the allowance.
How do I sell and add credit safely?
The pattern that works:
- Sell the credit pack as a normal product in your Comecero shop, so it goes through your usual checkout and receipts.
- When the order is paid, add the credit with one API call, using the order id in the
idempotency_key.
curl -X POST https://api.comecero.com/api/v1/usage/entitlements/credit_cust_8412/credits \
-H "Authorization: Bearer $COMECERO_SECRET_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"amount": 100.00,
"idempotency_key": "order_ORD5501_starter_pack",
"description": "Starter pack"
}'
The same key adds the credit once. A retried webhook or job answers "added": false with the current balance, so a customer can never get the same pack twice. You can also add credit by hand in the dashboard: Usage Billing, Customers, open the customer, Add credit.
What keeps balances right?
- Never below zero. A balance is never overdrawn, even when several metrics draw on it in one billing run.
- One customer only. A credit funds only its own customer's usage.
- No race. If credit is used elsewhere between working out a bill and writing it, the bill waits and finishes after a top-up.
- Every change is recorded. Each top-up and drawdown is an entry in the credit's ledger, which you can read with the API.
Credit or overage: which should I offer?
Many AI products offer both: a plan with an allowance and pay-as-you-go overage for most customers, and credit packs for those who want a fixed budget. In Comecero both live on the same subscription and the same invoice, so you don't have to choose up front. See how the whole flow works in Usage-based billing for AI products, and the pricing options in Usage-based pricing models explained.
Frequently Asked Questions
What is credit burndown billing?
A way of billing usage where a customer's prepaid credit is used to pay for usage above their plan's allowance before anything is charged to their card.
What is used first: the allowance or the credit?
The included allowance is used first, then the prepaid credit, then the rest is charged.
What happens when a customer runs out of credit?
With the default soft limit, the rest is charged on the invoice. With a hard limit, nothing is charged and the bill waits until the customer adds credit.
Can credit be added twice by mistake?
No. Every top-up needs an idempotency key, and the same key adds the credit only once.
Can I give a customer free credit?
Yes. Add credit to their credit entitlement with a description such as "Outage credit". It is used the same way as credit they paid for.
The bottom line
Prepaid credit gives customers a fixed budget and gives you cash before cost. Use a clear burndown order, add credit with an idempotency key, and show customers their balance. See usage billing and credits on Comecero.




















