How to Sell AI Credits: Packs, Balances and Auto Refill
You sell AI credits by selling a prepaid pack, giving each buyer a balance, and spending that balance from your backend every time they run a job. On Pocketsflow, Credits is a product type: the pack price becomes the buyer's balance, your app calls POST /credits/deduct to spend it, and buyers who opt in are topped off automatically when they run out.
Why AI apps sell credits
AI apps sell credits because every generation costs money to run. A flat plan lets one heavy user burn through your model budget. A prepaid balance means the buyer pays before the work happens, so a render, a chat answer or a transcription is always covered. Pocketsflow credits fit AI image and video tools, chatbots, LLM apps and APIs that price each job differently.
Credit packs vs usage metering on Pocketsflow
Pocketsflow supports two ways to charge for use, and they work in opposite directions.
| Question | Credit packs | Usage metering |
|---|---|---|
| When the buyer pays | Before use | After the billing period |
| Product | Credits product or subscription | Subscription with meters |
| Your app calls | POST /credits/deduct | POST /subscriptions/{id}/usage |
| Unpaid usage risk | None: no balance, no job | A card can fail at period end |
| Plan needed | None | Pro |
Credits suit pay-as-you-go buyers and one-off users. Metering suits teams on a monthly plan who expect an invoice for what they used. The guide to usage-based billing covers meters, tiers and seats in depth.
How to set up AI credits on Pocketsflow
- In the Pocketsflow dashboard, create a product and choose Credits as the type. The price is the balance the buyer gets, for example a $20 pack grants a $20 balance.
- Optional: turn on auto refill and set a top-off amount. Checkout shows the buyer the amount and a consent line before they pay.
- Add a webhook in Developers and tick the six credit events. Store the account id from
credit.grantednext to the user in your app. - Create a live API key for your server. Keep it out of the browser.
- Call
POST /credits/deductwithaccountId,amountCentsand a shortreason, such as "image render", after each job. - Test the whole flow in test mode with a test API key, then switch to live.
Pocketsflow balances are kept in cents, so price your jobs in cents too. If a render costs you 2 cents to run, deduct 5 cents and the margin is built into every job.
How your app checks and spends a Pocketsflow balance
Pocketsflow spends a balance in one atomic step: the deduct only passes when the balance covers the full amount. Two jobs that finish at the same time can never both spend the last dollar. Your app reads the result:
- Success: the response carries the new balance, so you can show it in your app without a second call.
- 409 insufficient: the balance is too low for this job. Nothing is spent. Ask the buyer to buy another pack.
- 409 paused: the last top-off failed. Stop the job and send the buyer to their balance page.
A good pattern is to check before you run an expensive model call. Keep the balance from the last webhook or deduct response in your database, block the job when it is too low, and deduct once the job succeeds. GET /credits/accounts lists every balance, filtered by product or status, when you need to resync.
The six Pocketsflow credit webhook events
Pocketsflow sends a signed event for every balance change, so your app never has to poll.
credit.granted: a pack was bought and its balance added.credit.balance_changed: any movement, with a reason of purchase, usage, refill, adjust or refund.credit.auto_refill.succeeded: a top-off charge went through.credit.auto_refill.failed: a top-off failed and the account is paused.credit.consent.enabledandcredit.consent.disabled: the buyer turned auto refill on or off.
How Pocketsflow auto refill protects buyers
Pocketsflow auto refill runs only with consent. When a deduct brings the balance to zero, the buyer's saved card is charged once for the top-off. A deduct that is larger than the balance is refused instead, so size your jobs so the balance lands on zero or ask for a new pack. If the top-off fails, the balance is paused, the buyer gets an email, and nothing retries on its own. From the balance link in their receipt, the buyer can retry once or turn auto refill off, after confirming their receipt email.
What a credit pack leaves you on Pocketsflow
Every pack and every top-off is one payment with the Pocketsflow fee, 4.7% + $0.30 as of November 2026, with tax handled as the merchant of record. There is no monthly fee for selling credits.
| Point | You keep | Pocketsflow fee |
|---|---|---|
| $5.00 | $4.46 | $0.54 |
| $10.00 | $9.23 | $0.77 |
| $20.00 | $18.76 | $1.24 |
| $50.00 | $47.35 | $2.65 |
| $100.00 | $95 | $5 |
Source: Pocketsflow pricing (4.7% + $0.30 per payment), November 2026. One pack or top-off payment, before payout fees.
A $20.00 pack leaves you $18.76. A $5.00 pack leaves $4.46, because the fixed part of the fee is 10.8% of a small payment against 5% of a $100.00 one. Start your smallest pack around $10 to $20 and set the top-off to the same amount, not a few dollars.
Manage Pocketsflow credits with AI
Pocketsflow's MCP server lets Claude, ChatGPT or Cursor set up the selling side. Paste prompts like these:
- "Create a $20 credit pack for Renderly with $20 auto refill" (
create_product) - "Send credit events to https://api.example.com/hooks" (
create_webhook,test_webhook) - "How many packs sold this week?" (
list_orders)
Spending a balance stays a backend call from your app with an API key: there is no MCP tool for deducting credits. Payment refunds stay in the dashboard. For the full picture, see the Pocketsflow credits page, how to sell API access and Pocketsflow pricing.