
Software & AIJuly 16, 2025
Stripe for AI platforms: subscriptions and credits in LetsAI
Integrating payments in an AI platform isn't like putting a "Buy" button on an e-commerce. Subscriptions, consumable credits, usage-based billing and async webhooks. Here's how we did it with Stripe — mistakes included.

The hybrid model: subscription + credits
LetsAI isn't a classic SaaS. A video generation costs 10x more than an image. A flat subscription wouldn't make sense.
Chosen model: base subscription with monthly credits included + extra credits on-demand. Stripe handles both with different Products and Prices. Subscription = monthly Subscription. Extra credits = one-shot Payment Intent.
60% of revenue from subscriptions, 40% from extra credits — healthy mix.
Webhooks: the heart of the integration
With Stripe 90% of logic is in webhooks. Payment ok → Stripe sends event to server. Miss it, user paid without credits. Process twice, double credits.
We handle: checkout.session.completed (credit), invoice.payment_succeeded (renewal), invoice.payment_failed (3-day grace period), customer.subscription.deleted (downgrade).
Every webhook verified with Stripe signature, processed idempotently. Same event twice → ignored via event ID.
Golden rule: log everything. When a user says "I paid but no credits" you must reconstruct in 2 minutes.
Hosted Checkout vs custom form: the numbers
We had a custom form with Stripe Elements. Beautiful, branded. Abandonment rate: 35%.
Switched to Stripe Checkout (hosted): abandonment dropped to 12%. Users recognize Stripe, trust it. Apple Pay, Google Pay, saved cards — all included.
23% more conversions is worth much more than a form that "looks like ours".
Only customization: metadata in Checkout Session (user_id, plan, credits) for the webhook.
Disputes and refunds: the side nobody talks about
Tutorials end at "payment completed". Problems come after.
Disputes: 7 days to respond with evidence. We auto-save generation logs, usage timestamps, result screenshots. We win 90% of disputes.
Refunds: unused credits → full refund. Used → proportional. Automatic calculation via PostgreSQL + Stripe API.
Prevention: Stripe Radar active + block accounts with >3 disputes in 6 months. A dispute costs €15 fee plus account risk.
Related Services
See how we apply these technologies in our enterprise projects.
Interested?
Contact us to receive a personalized quote.
All articles
Securvita S.r.l. — i3k.eu