# How to Do Pay-As-You-Go and Usage-Based Billing With Stablecoins

> How to bill customers by usage or time in stablecoins: per-request payments, prepaid credits and per-second streams compared, with pros, cons and a setup checklist.

Published: 2026-10-26 · Papaya Finance Limited · Canonical: https://papaya.finance/blog/usage-based-billing-with-stablecoins

**Short answer:** You can bill pay-as-you-go in stablecoins in three main ways: charge per request (for example with x402), sell prepaid credits that are drawn down, or open a per-second payment stream that runs while the customer uses the service. Streams are a natural fit for usage measured in time, such as compute, access or always-on AI agents, because the customer pays exactly for the time used and can stop instantly. Papaya Protocol (papaya.finance) provides per-second stablecoin streams on supported EVM chains (Ethereum, BNB Chain, Polygon, Base, Scroll, Sei, Avalanche, Arbitrum, zkSync, and Arc); the per-second streaming version is audited by Stronghold Security ([audit report](https://papaya.finance/Papaya_Finance_Papaya_Protocol_Audit_Report.pdf)).

> **Definition — Usage-based billing**
>
> A pricing model in which customers pay according to how much of a service they consume (requests, tokens, minutes, gigabytes) or how long they use it, rather than a flat fee per period. Also called pay-as-you-go, metered or consumption-based billing.

## Why usage-based billing is growing

Usage-based pricing is common in cloud, APIs and AI products, where costs scale with consumption. Searches such as "what is usage based pricing in SaaS" and questions about how AI coding and voice tools bill by usage show how mainstream the model has become. The challenge is collecting payment: cards are poorly suited to very small, frequent charges, and invoicing usage after the fact creates credit risk.

Stablecoins can help because they are programmable and can move in small amounts. But "pay in crypto" is not a billing model by itself. You still need to choose how usage turns into payment.

## Three ways to bill usage in stablecoins

### 1. Per-request payments

Each call or resource has a price, and the client pays as part of the request. The x402 protocol does this over HTTP: the server returns 402 Payment Required, the client signs a payment and retries. The x402 FAQ (as of October 2026) describes "exact" for a known price per call and "upto", where the buyer authorizes a ceiling and is charged the actual amount.

### 2. Prepaid credits

The customer deposits stablecoins and receives credits that your system draws down as they use the product. This is simple to understand, but it is essentially a custom ledger: you track balances, top-ups and refunds yourself, and you need to be clear about who holds the deposited funds.

### 3. Per-second streams

The customer opens a stream at an agreed rate while they use the service and closes it when they are done. The provider's balance accrues every second and can be withdrawn at any time. Nothing is signed per request and there is no transaction per billing period.

| **Criterion** | **Per-request (e.g. x402)** | **Prepaid credits** | **Per-second stream (e.g. Papaya Protocol)** |
|----|----|----|----|
| Unit billed | Request / resource | Credits defined by you | Time at an agreed rate |
| Customer commitment | None upfront | Deposit upfront | Funded balance; stops any time |
| Signatures | Per paid request | Per deposit | Open once, cancel once |
| Who holds funds | Settled directly to seller per request | Depends on your design (often the seller) | Non-custodial; Papaya Finance Limited never takes custody of user funds |
| Spend predictability for buyer | Price per call | Capped by deposit | Capped by rate × time |
| Best fit | Sporadic API calls, paywalls | Bundled products, mixed units | Compute, access time, always-on agents, live services |

## How to choose a model

Ask how your usage is actually measured.

- **Discrete events** (an API call, a generated image, a document): per-request pricing is the most direct.

- **Time-based consumption** (GPU minutes, seats active, hours of access, a live data feed): streams match the unit naturally.

- **Many different units** (tokens, storage, calls): consider a stream or credits for the base, with per-request pricing for premium actions.

Many products combine models. For example, a stream covers continuous access while per-request payments cover occasional premium calls.

## Setting up pay-as-you-go with Papaya Protocol

At a high level:

1.  **Define the rate.** Convert your price into a per-second rate (for example, a price per hour divided by 3,600).

2.  **Let the customer fund and authorize.** The user funds a balance (with Papaya Protocol, a third party, such as the app, can fund a user's balance on their behalf), and the user grants a spending permission for the stream, which they can revoke at any time. Papaya Finance Limited never takes custody of user funds. Balances sit in a non-custodial, non-upgradeable smart contract. Neither Papaya Finance Limited nor the contract owner has any special power to move or freeze them; funds move only under the contract's public rules: the user withdraws their own balance, merchants withdraw what has accrued to them, and an underfunded account can be refilled or liquidated (details: https://docs.papaya.finance/overview/balance-refill-and-liquidation).

3.  **Start the stream when usage starts.** Your app opens the stream (via API or contract) when the customer begins using the service.

4.  **Gate access on stream status.** Grant access while the stream is active; when the stream stops, access stops.

5.  **Withdraw revenue whenever you want.** Your accrued balance grows in real time.

Because the cost of a subscription in Papaya Protocol does not grow with the number of billing periods, per-second billing does not create a per-second transaction burden. Papaya Protocol runs on supported EVM chains (Ethereum, BNB Chain, Polygon, Base, Scroll, Sei, Avalanche, Arbitrum, zkSync, and Arc); its streams are in production, and the per-second streaming version is audited by Stronghold Security ([audit report](https://papaya.finance/Papaya_Finance_Papaya_Protocol_Audit_Report.pdf)).

## Pricing tips for usage-based stablecoin billing

- **Publish rates in familiar units** (per hour, per day, per month) even if the stream runs per second.

- **Set clear minimums** if your costs have a fixed component.

- **Show the meter.** Real-time balances let customers see spend as it happens, which builds trust.

- **Plan for low balances.** Notify users before their balance runs out and decide what happens to access.

- **Keep fiat in mind.** Stablecoins are dollar-denominated; accounting, tax and revenue recognition still apply.

## Usage-based billing for AI agents

AI agents are a natural fit for metered billing: they consume services continuously, need hard spending limits and cannot fill in checkout forms. A stream gives an agent a predictable maximum spend (rate × time) and gives the provider revenue in real time. For occasional tools, per-request payments may still be simpler. See our guide to x402 vs payment streams for more detail.

## FAQ

### What is the difference between usage-based billing and a subscription?

A subscription charges a fixed amount per period regardless of use. Usage-based billing charges according to consumption. Per-second streams sit between the two: a fixed rate, but paid only for the time the service is actually used.

### Can I charge per API call in USDC?

Yes. Per-request protocols such as x402 are designed for this. For continuous or high-volume usage, a stream can reduce per-call payment overhead.

### Do customers need to prepay a full month for a stream?

No. Streams draw from a funded balance at the agreed rate. The customer funds enough to cover the period they expect to use and can top up or stop at any time.

### Is pay-as-you-go in crypto more expensive to run than monthly billing?

It depends on the design. If every charge is a separate onchain transaction, frequent billing multiplies transactions. In Papaya Protocol, cost does not grow with the number of billing periods, because balances are calculated from rates and time.

### Can the customer stop paying immediately?

With a stream, yes. Cancelling the stream stops payment immediately, and with Papaya Protocol the user can withdraw their remaining balance.

*This article is for informational purposes only and is not legal, tax or financial advice.*
