Ask for consent to refill at checkout.
A checkbox on the checkout lets the buyer opt in to topping off $25.00 automatically with the saved card. Nothing is charged later without that tick.

Captionly sells $25 credit packs. Every caption your app renders deducts a few cents, and buyers who opt in are topped up automatically when the balance hits zero.


AI products cost money every time someone uses them, so a flat monthly plan either loses you money on heavy users or overcharges light ones. Metered billing after the fact means chasing cards that fail.
Credits flip it around: buyers pay first. A Credits product grants a balance worth its price, your backend calls POST /credits/deduct with an amount in cents for each unit of work, and every call returns the new balance.
With auto-refill on, the buyer's saved card is charged once for a top-off when the balance reaches zero, so usage carries on. Tax is added to every pack and top-off for the buyer's country.
Pocketsflow handles usage billing with prepaid credits: buyers pay for a credit pack first, and your backend calls POST /credits/deduct with an amount in cents for each unit of work. Buyers who opt in at checkout are topped up from their saved card when the balance hits zero, so there is no metering after the fact and no chasing cards that fail.
A checkbox on the checkout lets the buyer opt in to topping off $25.00 automatically with the saved card. Nothing is charged later without that tick.

$18.40 left, the card on file and the last top-off. Buyers turn auto-refill off or retry a failed payment there, after confirming their receipt email.

Captionly Studio grants a $15 credit pack every billing cycle, with auto-refill on top for months that run hot.


credit.granted fires with their account id and a balance worth the pack's price.
POST /credits/deduct with the account id, an amount in cents and an optional reason. The response carries the new balance.
With consent, the saved card is charged once for the top-off and credit.auto_refill.succeeded fires. If the charge fails, the balance pauses and the buyer gets an email; nothing is retried on its own.
Your AI creates the credit products and webhooks over MCP. Deducting stays a backend call from your app, with an API key.
create_product
Create a $25 credit pack for Captionly with auto-refill of $25.
Created Captionly AI credits at $25.00 with an optional $25.00 auto-refill. Here is its checkout link.
create_webhook
Add a webhook for credit balance changes to captionly.app.
Webhook added for credit.balance_changed and the auto-refill events. The signing secret is on the webhook page.
get_net_revenue
How much did credits bring in this month?
Here are this month's credit pack and top-off sales, with refunds taken out.
Sell a credit pack, deduct usage in cents from your backend with POST /credits/deduct, and keep your app in sync with the signed credit events.
import { Pocketsflow } from "pocketsflow";
const pf = new Pocketsflow({ apiKey: process.env.POCKETSFLOW_API_KEY });
// A $20 credit pack. Buyers who opt in are topped off with
// another $20 when their balance hits zero.
const pack = await pf.products.create({
name: "API credits",
price: 20,
productType: "credits",
creditAutoRefill: { enabled: true, topOffCents: 2000 },
});
const session = await pf.checkout.create({
productId: pack._id,
successUrl: "https://example.com/app",
});
redirect(session.url);A Credits product grants a prepaid balance worth its price when someone buys it. Your app spends that balance by calling POST /credits/deduct with the buyer's account id, an amount in cents and an optional reason.
If you set a top-off amount, buyers can opt in at checkout. When their balance hits zero, their saved card is charged once for the top-off and the balance is credited, so usage carries on.
The balance is paused and the buyer gets an email. No further charges are attempted on their own; the buyer can fix the payment and retry from their balance page.
Yes, any time, from the balance link in their receipt. Changing settings asks for their receipt email first, so a shared link cannot change consent.
Every deduct returns the new balance, you can list accounts with the API, and signed webhooks fire on credit.granted, credit.balance_changed, credit.auto_refill.succeeded, credit.auto_refill.failed and consent changes.
2% a sale, plus card processing passed through at cost. No monthly fee and no setup fee. Selling $50,000 or more a month? The Volume plans lower the platform fee to 1% or 0.5%.
We do. Pocketsflow is the merchant of record, the legal seller on every order. We work out the tax for the buyer's country, add it at checkout, file and remit it, screen the payment for fraud, handle chargebacks and send the receipt. You get one payout.
Yes. Add the Pocketsflow MCP server to Claude, ChatGPT, Gemini, Grok, Perplexity, Meta AI, Cursor or your own agent, sign in and click Allow access. There is no API key to paste. Your AI gets the same permissions you have, and every change it makes shows up in your dashboard.
Sell a pack, deduct in cents, refill with consent. Tax handled on every top-off.
Start selling free