Buckets:
| id,category,option,best_for,avoid_when,tradeoffs,tags,last_verified | |
| EC001,Checkout Flow,Stripe Checkout (hosted page),"Fastest path to a PCI-compliant checkout — redirect to Stripe's own hosted payment page, minimal frontend work, built-in support for many payment methods","Needing full control over checkout UI/branding, or a fully embedded in-app checkout experience","Stripe hosts the entire card-entry UI so you never touch raw card data (lowest PCI burden), at the cost of less visual control than a custom checkout","stripe-checkout|pci-compliance|hosted-checkout",2026-07-03 | |
| EC002,Checkout Flow,"Stripe Elements (embedded, custom UI)","Product needing checkout to feel fully native/embedded in the app's own UI, while still avoiding raw card data touching your server","A team wanting the absolute minimum implementation effort — Checkout (EC001) is simpler to integrate","Full UI control with Stripe handling the sensitive card input fields (via iframes) so raw card numbers still never hit your server, at the cost of more implementation and testing surface than hosted Checkout","stripe-elements|embedded-checkout|custom-ui",2026-07-03 | |
| EC003,Checkout Flow,"Payment Intents API (custom flow, SCA-ready)","Building a fully custom payment flow (e.g. a multi-step checkout, marketplace splitting) that needs Strong Customer Authentication (3D Secure) handled correctly","A standard checkout with no unusual flow requirements — Checkout or Elements already implement this correctly with less custom code","Maximum flexibility for complex flows, but you're responsible for correctly handling every intent status (requires_action, requires_confirmation, etc.) — get this wrong and SCA-required payments silently fail","payment-intents|sca|custom-flow",2026-07-03 | |
| EC004,Recurring Revenue,Stripe Billing (subscriptions),"SaaS products with recurring revenue — Stripe manages subscription lifecycle, proration, invoicing, dunning (failed payment retry) natively","A pure one-time-purchase product with no recurring billing need","Handles the genuinely hard parts of subscription billing (proration on plan changes, automatic retry on failed renewal, invoice generation) that are error-prone to build correctly from scratch","stripe-billing|subscriptions|saas",2026-07-03 | |
| EC005,Recurring Revenue,Usage-Based Billing (metered),"Products charging per-usage (API calls, compute time, seats that fluctuate) rather than a flat recurring fee","Simple flat-rate subscriptions — flat Stripe Billing (EC004) is simpler when usage isn't the pricing basis","Report usage to Stripe via the API and let it handle proration/invoicing based on actual consumption, at the cost of needing reliable usage-reporting infrastructure on your end","usage-based-billing|metered|stripe",2026-07-03 | |
| EC006,Webhooks,Verify Every Webhook Signature Before Processing,"Every Stripe webhook endpoint, without exception — this is the payments-specific application of SEC038's signature-verification rule","Never applicable to skip — an unverified webhook endpoint can be triggered by anyone who discovers or guesses the URL, potentially spoofing a 'payment succeeded' event","Verifying the Stripe-Signature header against the webhook secret is cheap and eliminates an entire class of spoofed-event risk — there is no legitimate reason to skip it","webhooks|signature-verification|stripe",2026-07-03 | |
| EC007,Webhooks,Handle Webhook Delivery Idempotently,"Every webhook handler — Stripe may deliver the same event more than once (on timeout/retry), so handlers must be safe to run twice for the same event id (BE046)","Never assume single delivery — build idempotent handling from the start rather than retrofitting after a double-processing incident (e.g. double-fulfilling an order)","Use the event id as an idempotency key (store processed event ids, or make the underlying operation itself idempotent) so a duplicate delivery doesn't duplicate the side effect","webhooks|idempotency|stripe",2026-07-03 | |
| EC008,Webhooks,"Respond 2xx Quickly, Do Slow Work Asynchronously","Every webhook handler — acknowledge receipt fast (Stripe expects a response within a few seconds) and queue any slow follow-up work (sending emails, updating external systems) rather than doing it inline","A handler whose work is already trivially fast — no need to introduce a queue purely for ceremony if the whole handler reliably completes in milliseconds","A slow webhook handler causes Stripe to consider the delivery failed and retry it, turning a slow-but-successful handler into a duplicate-delivery problem (compounding EC007's idempotency requirement) — this is BE051's async-job pattern applied to webhooks","webhooks|async-processing|stripe",2026-07-03 | |
| EC009,Server-Side Amount Handling,"Compute Charge Amounts Server-Side From the Order, Never Trust a Client-Supplied Total","Every payment flow — the amount charged is computed from the actual order/cart contents stored server-side, this is the payments-specific restatement of SEC040/SEC009","Never applicable to skip — a tampered client-side price is the most direct way an attacker can under-pay if the server trusts a client-supplied amount","Recomputing the charge amount server-side from trusted data is a small amount of extra code that closes off an entire exploit class, not an optional hardening step","price-tampering|server-side-validation|stripe",2026-07-03 | |
| EC010,Test Mode,"Separate Test and Live API Keys, Never Mixed","Every environment — development/staging use Stripe test-mode keys (sk_test_/pk_test_) exclusively, production uses live keys (sk_live_/pk_live_) exclusively, matching the DO053 environment-separation principle","Never use a live key in a non-production environment even 'just to check something' — test-mode payment methods and real cards behave identically from the API's perspective","Stripe's test mode fully simulates the payment flow (including specific test card numbers for success, decline, and 3DS-required scenarios) without ever touching real money — this discipline is what prevents an accidental real charge","test-mode|api-keys|environment-separation",2026-07-03 | |
| EC011,Refunds & Disputes,Refund Logic Handles Partial Refunds and Updates Order State Consistently,"Any product supporting refunds — the refund flow updates order/fulfillment state in your own database to match, not just issues the Stripe refund and stops there","A refund that only touches Stripe's records without updating your own order state — never leave this gap even for a 'simple' refund path","Treat refund as a first-class state transition in your own order state machine (DB029), not a side-channel operation only visible in the Stripe dashboard, so your system and Stripe's records never drift apart","refunds|order-state|stripe",2026-07-03 | |
| EC012,Refunds & Disputes,Dispute (Chargeback) Webhooks Trigger a Defined Internal Process,"Any product accepting cards — chargeback/dispute webhook events trigger a defined process (notify a human, gather evidence, respond within Stripe's deadline)","Silently logging a dispute event with no active alert — never treat disputes as passive logging, the response deadline is real and enforced by Stripe","Missing a dispute response deadline results in an automatic loss of the dispute regardless of its merits, so this needs an active alert wired to a human, not a log line nobody watches","disputes|chargebacks|stripe",2026-07-03 | |
| EC013,Payment Methods,"Support Multiple Payment Methods via Stripe's Unified API, Not Just Cards","Products with an international or diverse customer base — Stripe's Payment Element/Checkout automatically offers regionally relevant methods (wallets, bank debits, buy-now-pay-later) without separate integration per method","A narrowly-scoped MVP where card-only is an acceptable initial launch simplification","Higher conversion from offering locally-preferred payment methods, largely 'free' via Stripe's unified Payment Element rather than requiring separate integration work per method","payment-methods|localization|stripe",2026-07-03 | |
| EC014,Marketplace/Platform,Stripe Connect for Multi-Party/Marketplace Payments,"Platforms paying out to multiple sellers/creators/contractors — Connect handles the split payment, KYC/onboarding of payees, and payout compliance","A single-recipient business (all revenue goes to one bank account) — plain Stripe Billing/Payments is simpler there","Handles the genuinely hard parts of marketplace payments (regulatory KYC on payees, payout scheduling, tax form generation) that are extremely costly to build and maintain independently","stripe-connect|marketplace|multi-party",2026-07-03 | |
| EC015,Compliance,"Stripe Tax for Automatic Tax Calculation, Not Hand-Rolled Tax Logic","Any product selling across multiple tax jurisdictions — Stripe Tax calculates and can remit sales tax/VAT automatically based on customer location and product tax category","A single-jurisdiction business with a fixed, simple tax rate that doesn't vary — hand-rolled logic may be acceptable there, though still worth reassessing as the business expands","Tax rules (rates, nexus thresholds, product categorization) change frequently and vary by jurisdiction — hand-rolled tax logic is a maintenance burden and compliance risk that a dedicated tax service is built to handle correctly","stripe-tax|sales-tax|vat|compliance",2026-07-03 | |
| EC016,Server-Side SDK Usage,Never Expose the Stripe Secret Key Client-Side,"Every integration — the secret key (sk_...) is used only in server-side code; only the publishable key (pk_...) is ever sent to the client — this is DO050's build-time-vs-runtime rule applied specifically to Stripe","Never applicable to skip — the secret key can create charges, issue refunds, and access customer data; exposing it is a complete-compromise-level mistake","There is no legitimate reason for the secret key to ever leave the server — treat any code path that would expose it client-side as a bug, not a tradeoff to weigh","secret-key|client-exposure|stripe",2026-07-03 | |
| EC017,Idempotency,Use Stripe's Idempotency-Key Header for Charge-Creating Requests,"Any client-initiated request that creates a charge/payment intent — pass an idempotency key so a network retry (client timeout, double-click) doesn't create a duplicate charge","A read-only or non-mutating Stripe API call — idempotency keys matter specifically for requests that create a side effect","This is BE058 applied to Stripe's own built-in idempotency mechanism — Stripe deduplicates requests with the same idempotency key within a 24-hour window automatically, at essentially no implementation cost","idempotency|duplicate-charges|stripe",2026-07-03 | |
Xet Storage Details
- Size:
- 10.7 kB
- Xet hash:
- cedb1d5f3a8c2f89513bbd7b0de68f0814550d43c90f626658173701593bad75
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.