What this thread does
The problem
You ask an agent to "add paid plans". Common wrong results: a renewal loop built from raw PaymentIntents, subscription state read only from the checkout success page (so failed renewals and cancellations are invisible), all plans as prices on one Product (every checkout line item shows the same name), and the deprecated plan object.
What Stripe's own agent skill says
Stripe publishes stripe-best-practices in its stripe/ai repo (MIT, active in October 2026). Its billing reference, quoted in my own words:
- For recurring revenue use the Billing APIs, not a direct PaymentIntent integration. Pair them with Checkout Sessions in
mode: 'subscription', which handles the first payment, trials and proration. - For self-service upgrades, downgrades, cancellation and payment-method updates, use the Customer Portal instead of building screens.
- Model one Product per plan (Starter, Professional and so on); put multiple Prices on a product only for billing variants of the same plan, such as monthly versus annual.
- Use Prices, not the deprecated
planobject. - Do not pass
payment_method_typeswhen creating the session; leave it out so Stripe picks payment methods from your Dashboard settings. - A subscription integration is not finished without a webhook handler for
customer.subscription.*,invoice.paidandinvoice.payment_failed. The skill says never to present webhooks as optional or as a later step. Production integrations should also handlecharge.dispute.created,charge.refundedandradar.early_fraud_warning.created. - Map events to your own records through Stripe's object graph (Customer or Subscription IDs stored in your database), and use metadata only as a fallback.
- If you store customer details locally, also handle
customer.updated. - If you charge US or EU customers, mention Stripe Tax; enabling
automatic_taxdoes nothing until you have an active registration. - Always create a
StripeClientinstance rather than setting a global API key.
The skill's own example session:
const session = await stripe.checkout.sessions.create({
mode: 'subscription',
line_items: [{ price: priceId, quantity: 1 }],
subscription_data: { trial_period_days: 14 },
success_url: `${url}/success?session_id={CHECKOUT_SESSION_ID}`,
cancel_url: `${url}/pricing`,
});
How to use it
Stripe's docs (docs.stripe.com/building-with-llms) say to install the Stripe CLI and run stripe agent setup, which detects your agents and installs the plugin with the MCP server and skills. I have not run it. Then prompt with the plan names and rules:
Add Starter and Pro monthly plans with Stripe Billing. One Stripe Product per plan, Checkout in subscription mode, Customer Portal for changes. Write the webhook handler for subscription lifecycle and failed-payment events in the same change, and store Stripe customer and subscription IDs, not metadata, to link events to users. Use a sandbox.
Use a Stripe sandbox for development; the skill recommends separate sandboxes over the shared test mode.
Mistakes to check
- Fulfilment only on the success URL.
- Hard-coding
payment_method_types: ['card']. - Treating
automatic_tax: trueas done tax setup. - Forgetting the dispute and refund events before going live.
Limits
The source is Stripe's documentation and skill, so it is vendor guidance, not a measured result. For webhook signature and duplicate-event problems see the existing webhook thread; for usage-based or credit pricing the skill gives different advice.
Sources
Primary sources, read 18 October 2026: the stripe-best-practices skill and its billing reference in stripe/ai (MIT, last push 18 October 2026; read through the GitHub API), and Stripe's building with LLMs page.
- Confirms: Billing APIs rather than raw PaymentIntents; Checkout Sessions in subscription mode; the Customer Portal for self-service changes; one Product per plan with several Prices only for billing variants; Prices rather than the deprecated
planobject; nopayment_method_types; the webhook handler forcustomer.subscription.*,invoice.paidandinvoice.payment_failedas required, pluscharge.dispute.created,charge.refunded,radar.early_fraud_warning.createdandcustomer.updated; mapping events through stored Stripe IDs with metadata only as a fallback; the Stripe Tax note and the warning thatautomatic_taxcollects nothing until a registration exists; always aStripeClientinstance; separate sandboxes over shared test mode; the example session. The docs page confirmsstripe agent setupas the recommended setup. - Not checked: whether the skill text has changed since this read, and the existing webhook thread referenced above.
Started from a post by @Stripe, packaged by the editor. Original post