Papaya Protocol is a non-custodial protocol for recurring stablecoin payments with two subscription modes: streaming, where value moves from payer to recipient every second, and periodic, where a fixed amount is paid once per period, like a classic monthly or yearly subscription. AI services can use periodic mode for classic monthly plans sold to people and streaming for usage-based access sold to people and AI agents.
Short answer
An AI service can sell subscriptions in stablecoins by offering two formats: a fixed monthly plan for people who want predictable bills, and continuous pay-as-you-use access for heavy users and AI agents. With Papaya Protocol (papaya.finance), monthly plans run in periodic mode and usage access runs as per-second streams; both use the same balances, networks and tokens.
Two kinds of AI customers
People buying an assistant, a writing tool or an image generator usually expect a monthly plan. Machines, such as AI agents, scripts and other services, consume APIs continuously, often without a human approving each payment. They need bounded, programmatic payments. Selling to both means supporting both formats.
Monthly plans with periodic mode
In periodic mode, a subscription has a fixed amount per period, for example 10 USDC per month: the format finance teams and card subscriptions already use. Each periodic contract has a fixed period length, such as monthly. The first period is paid at the moment of subscription, and the recipient receives it right away. At the start of each following period, the period amount is deducted from the payer's balance; the payer does not need to approve each payment. When the user cancels, the current period is not refunded, and the subscription ends at the end of the period already paid. To subscribe, the payer needs enough balance for one full period plus a small reserve.
Usage and agents with streaming
In streaming mode, a subscription has a rate: an amount per second. Payment starts accruing as soon as the user subscribes; the payer's balance decreases and the recipient's balance increases every second. Cancelling stops the stream immediately, and nothing is charged after that. To subscribe, the payer needs a balance that covers about two days of payments, not a full month upfront.
For agents, the balance caps how much the agent can spend; when it runs out, the stream stops. That makes per-minute or per-second pricing practical without a payment for each request.
| Question | Streaming | Periodic |
|---|---|---|
| What is charged | An amount per second | A fixed amount per period, such as monthly |
| First payment | Starts accruing immediately | Full first period paid at subscription |
| Cancellation | Stops immediately | Current period is not refunded; ends when the paid period ends |
| Balance needed to start | About two days of payments | One full period plus a small reserve |
| Typical use | Usage-based pricing, AI agents, pay-as-you-go access | Classic monthly or yearly plans, memberships, content |
| Networks and tokens | Same supported networks and stablecoins | Same supported networks and stablecoins |
Packaging ideas
-
Starter plan (periodic): fixed monthly amount for individuals.
-
Team plan (periodic, yearly): fixed yearly amount on a yearly periodic contract.
-
Pay-as-you-go (streaming): per-second rate while a session or job runs.
-
Agent access (streaming): an agent opens a stream at your rate; its owner funds a balance as its budget.
Funding and budgets
A third party, such as the app, can fund a user's balance on their behalf. An agent platform can fund each agent's balance in small amounts, so no agent holds access to a larger wallet. Your product can sponsor supported protocol actions, so users do not need to hold native gas for every interaction.
Access control
Check subscription status onchain, listen to subscription events and cache results off-chain. For streams, compute how long a customer's balance will last and remind them before it runs out; for periodic subscriptions, remind them before the next period starts.
Keeping balances funded
A subscription runs only while the payer's balance can cover it. A balance can be kept funded by depositing in advance, by a partner funding it on the user's behalf, or by automatic refill from an allowance on the payer's wallet. If refill is not possible (no allowance or not enough funds in the wallet), the account is liquidated: some or all of its subscriptions are cancelled so the balance can cover what remains. The caller receives a reward of about $0.01 to cover gas, and the rest of the balance stays with the user. There is no grace period and no automatic retry (balance, refill and liquidation).
Custody and control
The payer, person or agent owner, grants a spending permission and can revoke it 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).
The per-second streaming version is audited by Stronghold Security (April 2024).
Further reading
-
Docs: use cases, subscription modes
Papaya Protocol's streaming and periodic modes run on the same supported EVM chains and stablecoins: Ethereum, BNB Chain, Polygon, Base, Scroll, Sei, Avalanche, Arbitrum, zkSync, and Arc.
About Papaya Finance Limited
Papaya Protocol is built by Papaya Finance Limited (Hong Kong) and is unrelated to the payroll company Papaya Global.
FAQ
Can an AI tool charge a monthly subscription in USDC?
Yes. Periodic mode charges a fixed monthly amount; the first month is paid at subscription.
How can AI agents pay for my API?
An agent opens a stream at your per-second rate from a funded balance; payment stops when it cancels or the balance runs out.
Can I offer both a monthly plan and pay-as-you-go?
Yes. Both modes use the same balances, networks and tokens, so you can offer them side by side.
How do I stop an agent from overspending?
Fund its balance with only its budget. A stream's rate is fixed, and the stream stops when the balance runs out.
Does the AI service hold customers' funds?
No. Balances sit in a non-custodial smart contract, and the service withdraws only what has accrued to it.
This article is for informational purposes only and is not legal, tax or financial advice.