stripe-payment-flow

par AgentsRoomVérifié par AgentsRoomAucune installationAucun likeMis à jour le 7 mai 2026Catégorie : Ingénierie

Ce que ça fait

Use when integrating Stripe. Generates payment-intent endpoint, idempotent webhook handler, and the orders table migration.

L'installation ouvre cette fiche dans votre application AgentsRoom. Si l'application n'est pas encore installée, vous serez redirigé vers la page de téléchargement.

SKILL.md

---
name: stripe-payment-flow
description: Use when integrating Stripe. Generates payment-intent endpoint, idempotent webhook handler, and the orders table migration.
---

# Stripe payment flow

When asked to add a checkout / subscription flow:

1. Use Stripe Checkout for one-shot payments, Stripe Billing for subs — don't roll your own Elements unless the user insists.
2. Webhook handler MUST verify the signature (`stripe.webhooks.constructEvent`) before doing anything.
3. Webhook is idempotent: dedupe on `event.id`. The same event can fire twice in network failures.
4. Persist Stripe ids (`customer`, `subscription`, `payment_intent`) on your User / Order rows.
5. Never trust the client-side success URL alone — confirm via webhook before flipping `paid: true`.

Tags

backendstripepayments