Stripe for AI products and open-source apps: payments in Ghost, Cal.com and Typebot, plus usage-based billing for AI in 2026
What Stripe does
Stripe, founded in 2010 by Patrick and John Collison, processes online payments for millions of businesses. Its products cover the full revenue flow:
| Product | Use |
|---|---|
| Payments | Cards, wallets such as Apple Pay and Google Pay, bank debits and local methods |
| Checkout and Payment Links | Hosted payment pages with no front-end work |
| Billing | Subscriptions, usage-based prices, invoices, trials and proration |
| Customer portal | Hosted page where customers update cards and cancel |
| Connect | Payments for marketplaces and platforms, paying out to third parties |
| Radar | Fraud detection with custom rules |
| Tax | Calculates and collects sales tax and VAT |
Stripe is proprietary and hosted. It publishes open-source client libraries and an official MCP server, but the service itself is not open source.
Which directory projects use Stripe
| Project | What it is | Stripe use |
|---|---|---|
| Ghost | Publishing platform for blogs and paid newsletters | Paid memberships and tiers through Stripe Connect; payments go to the publisher |
| Cal.com | Open-source scheduling, a Calendly alternative | Charge for bookings and hold no-show fees through the Stripe app |
| Typebot | Open-source chatbot builder | Payment input block that collects card payments inside a conversation |
All three work self-hosted with your own Stripe account, which is one reason open-source apps standardize on Stripe: the integration works the same for every operator.
Pricing
Standard pricing for US businesses:
| Item | Fee |
|---|---|
| Domestic online card payment | 2.9% + $0.30 per successful charge |
| International card | +1.5% |
| Currency conversion | +1% |
| Manually entered card | +0.5% |
| Dispute received | $15 |
| Setup, monthly or hidden fees | None on standard pricing |
Billing, Tax, Radar's advanced features and other products have their own fees on top of payment processing. Rates differ by country, and businesses with large volume can negotiate custom pricing.
What fees mean for AI pricing
Fixed per-charge fees hurt small transactions. A $5 top-up of AI credits loses 6.9% to fees with a US card, while a $50 top-up loses 3.5%. That is why many AI products set a minimum credit purchase or bill monthly rather than per action.
Billing for AI usage
AI products often have costs that scale with use, so pure flat subscriptions can lose money on heavy users. Common models:
| Model | How it works in Stripe |
|---|---|
| Flat subscription with limits | One recurring price; enforce limits in your app |
| Subscription plus overage | Recurring price with included usage, metered price for extra |
| Pure usage-based | Metered price only; invoice at period end |
| Prepaid credits | One-off payments add credits; your app or Stripe's credit features decrement them |
| Seats plus usage | Per-seat price plus metered AI usage |
To meter usage:
- Create a meter in Stripe for the event you bill on, such as
tokens_used. - Attach a usage-based price to it, with tiers if needed.
- Send meter events from your back end with the customer ID and quantity as usage happens, or in batches.
- Stripe aggregates usage and adds it to the next invoice.
Record usage in your own database too, so you can show customers live usage and reconcile with Stripe. Open-source billing engines such as Lago and Flowglad handle more complex pricing logic and sync invoices to Stripe.
Integrating Stripe in an AI app
- Use Checkout or Payment Links for the fastest start, and the customer portal for plan changes and cancellations.
- Listen to webhooks such as
checkout.session.completed,customer.subscription.updatedandinvoice.paidto grant or remove access. Verify webhook signatures. - Store the Stripe customer ID on your user record.
- Make webhook handling idempotent, since Stripe can deliver an event more than once.
- Use test mode and the Stripe CLI to forward webhooks to your local server during development.
The Stripe MCP server and agent tools
Stripe publishes an official MCP server and an agent toolkit that let AI assistants create customers, products, prices, payment links and refunds, and search Stripe's documentation. Developers use it in Claude Code or Cursor to set up billing objects while building. Use restricted API keys with only the permissions the agent needs, and test-mode keys during development; an agent with a live secret key can issue refunds or change prices. See the MCP stack page.
Fraud and abuse
AI products attract card testing and trial abuse because free compute has resale value. Defenses:
- Radar rules that block high-risk payments and require 3D Secure for risky ones.
- Limit free usage until a card is verified, and cap usage before the first invoice is paid.
- Watch for many accounts sharing one card fingerprint.
- Rate-limit signup and checkout endpoints.
Each dispute costs $15 plus the lost revenue, and high dispute rates can put an account at risk.
Taxes
Selling software and AI services across borders creates sales tax and VAT obligations. Stripe Tax calculates tax at checkout and produces reports. Alternatively, a merchant of record such as Paddle or Lemon Squeezy, now owned by Stripe, takes on tax liability for a higher fee. For early-stage AI products selling globally, a merchant of record can save significant compliance work.
Open-source alternatives and complements
| Project | Role |
|---|---|
| Lago | Open-source usage-based billing engine |
| Flowglad | Open-source billing for developers, built around Stripe |
| Hyperswitch | Open-source payment orchestration across processors |
| Kill Bill | Self-hosted subscription billing |
| Polar | Open-source merchant of record and billing for developers |
None replaces card processing; they handle pricing, invoicing or routing and connect to processors.
Testing payments before launch
Stripe's test mode uses separate keys and test card numbers that simulate success, declines, 3D Secure challenges and disputes. Before launch, run through signup, upgrade, downgrade, failed renewal, cancellation and refund in test mode, and confirm that your webhook handler grants and removes access correctly in each case. Test clocks let you move a subscription forward in time to check renewals and trial endings without waiting.
Revenue analytics
Stripe's dashboard and Sigma show revenue, churn and failed payments. For AI products, compare revenue per customer with model cost per customer, which you can track in PostHog or Langfuse, to spot plans that lose money. Turn on Smart Retries and card updater features to recover failed renewals, which are a large share of churn for subscription products.
Related: PostHog stack, Next.js stack, MCP stack, Supabase stack, Ory stack, Stack index.
Frequently asked questions
How much does Stripe charge per transaction?
For standard US online card payments, 2.9% plus $0.30 per successful charge. International cards add 1.5%, currency conversion adds 1% and manually keyed cards add 0.5%. A $20 subscription paid with a US card costs $0.88 in fees. Other countries have their own rates.
How do AI companies bill for usage with Stripe?
They create a meter, send usage events such as tokens consumed or images generated from their app, and attach a usage-based price to the meter. Stripe totals usage per billing period and adds it to the invoice. Many combine a base subscription with included usage and overage charges, or sell prepaid credits.
Can I use Stripe with self-hosted Ghost, Cal.com or Typebot?
Yes. Each connects to your own Stripe account. Ghost uses Stripe Connect so payments go directly to you, and Ghost takes no cut of revenue. Cal.com and Typebot use your Stripe keys or app integration to charge for bookings or in-chat payments.
Is there an open-source alternative to Stripe?
Not for card processing itself, which needs a licensed payment processor. Open-source projects cover other layers: Lago and Flowglad handle usage-based billing logic, Hyperswitch routes payments across several processors, and Kill Bill is a self-hosted subscription billing system. They still connect to processors such as Stripe or Adyen.
How do I reduce chargebacks on an AI product?
Use Stripe Radar rules, require 3D Secure for risky payments, show a clear statement descriptor so customers recognize the charge, send receipts, make cancellation easy and refund quickly when asked. Free-trial abuse and stolen cards are common for AI tools with expensive compute, so limit usage before the first successful payment.