Usage based billing for API companies
Usage-based API pricing leaves a second choice: when buyers pay. Compare funded balances, invoices, credits and payment on each request.

Usage-based pricing tells an API company how much to charge. It leaves the timing of payment open. That decision determines whether the seller keeps a balance, waits for invoice payment, or collects payment for one request. It also determines which failures the buyer will ask the seller to explain.
Start with timing. Pre-funding gives the seller cash before later API work. Post-funded invoicing gives the buyer time after the work. Credits can alter either arrangement. For an occasional purchase, request-level pay-as-you-go asks for payment at the request itself. Choose by who is buying and how they want to pay.
Pre-funding collects before use
A top-up gives a repeat buyer a funded account. It makes the remaining budget visible and gives the seller money before later requests consume resources. This arrangement works for a customer making enough calls to justify the deposit.
Now the API seller needs a balance ledger, whether it runs one itself or uses a provider. The seller must tie a completed billable event to the right debit, survive retries without double charging, and explain a refund. Stripe's billing-credit documentation describes prepaid grants and ledger transactions. The terms of the provider matter more than the word 'prepaid': in basic Stripe billing, credits reconcile at invoice time and the customer can exceed the displayed balance during the cycle. Stripe's Metronome updates the remaining credit balance as usage arrives. A hard request limit still needs a check that refuses work when the balance is exhausted.
A top-up asks the buyer to choose a deposit before using anything. A one-time customer can pay more than the request costs, leave a balance behind, and return only to ask for it back. For one API action, that is more steps than the sale needs.
Invoices collect after use
An invoice is useful to a contracted buyer who wants several teams' use on one bill. The buyer can review agreed rates and pay after the period. The seller extends credit by doing the work first, so it has to attribute usage correctly and collect later.
Stripe can handle much of the billing operation. Its invoicing service supports collection and reconciliation, and its usage-billing lifecycle connects meter events to invoices. For a new integration, Stripe recommends Metronome. The seller still has to say which API event counts and send the right customer and usage information.
An invoice is therefore a sensible commitment when the customer wants contract terms. For one report, it may create a billing relationship longer than the purchase.
Credits are an allowance with rules
Credits are an allowance layered onto a funding arrangement. A buyer can purchase them before use; a seller can grant them for a trial; a contract can apply an allowance to later usage. The credit balance alone does not fix the date of payment.
The API seller must define what a credit buys and whether it expires. If it does, the buyer needs to know when. If a paid action fails, the buyer needs to know whether its credits return. Stripe's credit grants distinguish prepaid and promotional value and apply eligibility rules. Those tools can keep the records, but a product decision remains: which API result earns the debit? Credits help when an allowance simplifies a buyer's budget or agreement. They add confusion when the seller cannot answer that question.
Pay for one request
For a buyer who wants one report, an account and later invoice need not be the default. The API can offer a price for that request. The buyer's wallet approves the payment, and the seller's application can perform the work. In recuut's documented flow, the application asks for access, measures usage and controls delivery. recuut owns the resource price, accepted payment methods, settlement coordination and payment record. The record belongs to the purchase rather than to a separate customer balance or monthly bill.
In the default late-payment mode of recuut's Python decorators, the wallet approves payment before the work runs. The application then commits the measured usage to recuut, which starts settlement. If settlement fails, the application withholds the result. If settlement has not finished within the application's wait, 10 seconds by default, the application also withholds the result, but the payment can still complete. The seller must check that transaction before recovering any retained result, as recuut's flow explains. Early payment can confirm the charge first when fixed and input values determine the final price. A price that depends on output needs the work before its final charge is known.
The buyer must be able to authorize a fixed price or a usage price with a maximum. That maximum is part of the request-level offer. Under recuut's documented live requirements, the buyer pays native USDC on Base. A buyer needs a wallet or agent that can pay that way; a buyer who can only pay by card or invoice cannot use this path. To accept live payments, the seller also needs business verification, a verified receiving wallet on Base and a live server key. A recurring enterprise buyer who already wants one invoice may find those per-request approvals less useful than contract billing.
AWS WAF provides a different example of a payment requirement at the edge. It can return HTTP 402, verify authorization, fetch the origin content and settle through a facilitator after a successful fetch. AWS documents that order. AWS applies this to resources served through Amazon CloudFront and skips settlement when the origin returns a 4xx or 5xx response, as its lifecycle guide explains.
Put the ongoing work beside the price
- A returning buyer tops up before later use. The funded account makes the budget visible; the seller maintains or integrates balance and debit rules and enforces any hard cap.
- A contracted buyer pays an invoice after the billing period. One bill suits procurement; the seller attributes usage and handles collection.
- A buyer with a trial or commitment can use credits under either funding model. The seller defines what the allowance buys and how corrections work.
- An occasional buyer authorizes one fixed-price or capped request before work. recuut settles after work by default; the seller still owns usage, fulfillment and recovery.
A seller may invoice contract customers and let occasional buyers pay for a single request. Other providers can operate much of the metering and collection; the seller still has to connect its API result to their records. Pick the arrangement by who is buying, then count what you will have to run to support it. Invoice contracted buyers who want one bill. Where a one-off buyer can pay per request, do not open a billing account for that purchase. Keep the usage record either way.