Group
  • Payment Protection Pack

    Webhooks, idempotency, refunds, and dunning. Stop payments issues before they start.

    38 prompts

Prompts In This Pack

  • Payments

    Make cancellation actually cancel

    Traces the cancel flow end to end so cancelled subscriptions stop billing, with confirmation and correct end-of-period access.

    • Debug & fix
    • Improve quality
    • Beginner
    • General
  • Payments

    Handle abandoned checkouts deliberately

    Cleans up incomplete orders, expires stale checkout sessions, and optionally recovers abandoners with a reminder.

    • Automate workflows
    • Improve quality
    • Beginner
    • General
  • Payments

    Build a failed-payment recovery sequence

    Sends well-timed card-update emails when payments fail, with a working update link and clear stakes.

    • Automate workflows
    • Improve quality
    • Beginner
    • General
  • Testing

    End-to-end test my signup-to-paid flow

    Script a browser-level test of the full path from landing on the site to a completed payment, the flow that pays for everything.

    • Improve quality
    • Debug & fix
    • Advanced
    • General
  • Payments

    Enforce plan limits on the server, not the UI

    Moves feature gating and usage limits out of the frontend and into server-side checks on every protected action.

    • Improve quality
    • Debug & fix
    • Intermediate
    • General
  • Database

    Handle concurrent writes without lost updates

    Fixes read-modify-write races (counters, balances, inventory) with atomic operations or optimistic locking.

    • Debug & fix
    • Improve quality
    • Advanced
    • General
  • Payments

    Handle disputes and chargebacks deliberately

    Wires dispute webhooks to records and alerts, freezes implicated access, and builds the evidence you need to respond.

    • Plan & validate
    • Automate workflows
    • Advanced
    • General
  • Payments

    Recover failed renewal payments automatically

    Coordinates provider retries, card updater services, and retry timing so temporary declines don't become cancellations.

    • Automate workflows
    • Improve quality
    • Intermediate
    • General
  • Payments

    Handle failed payments and retries gracefully

    Adds retry logic, dunning emails, and clear UI states for declined cards and expired checkout sessions.

    • Improve quality
    • Automate workflows
    • Intermediate
    • General
  • Payments

    Make free trials convert cleanly

    Fixes trial start, expiry, and first-charge handling so trials end in a deliberate charge or downgrade, never a surprise.

    • Improve quality
    • Plan & validate
    • Intermediate
    • General
  • Payments

    Handle multiple currencies without rounding chaos

    Adds correct currency storage, formatting, and conversion rules so international customers see and pay accurate amounts.

    • Improve quality
    • Plan & validate
    • Intermediate
    • General
  • Payments

    Handle plan upgrades, downgrades, and proration

    Implements plan changes with correct proration timing, immediate vs. end-of-period logic, and clear customer messaging.

    • Improve quality
    • Plan & validate
    • Intermediate
    • General
  • Payments

    Set up sales tax and VAT before I charge anyone

    Adds automatic tax calculation to the checkout flow and makes invoices show tax correctly per jurisdiction.

    • Plan & validate
    • Improve quality
    • Advanced
    • General
  • Payments

    Handle 3D Secure and SCA authentication

    Makes payments that require bank authentication (3DS/SCA) complete instead of dying silently at the confirmation step.

    • Improve quality
    • Debug & fix
    • Advanced
    • General
  • Payments

    Make webhook processing reliable under failure

    Adds retry-safe handlers, correct response codes, and a reconciliation path for events your app missed.

    • Improve quality
    • Automate workflows
    • Advanced
    • General
  • Payments

    Add idempotency to payment operations

    Makes retries, double-clicks, and webhook replays safe by deduping charge and refund operations.

    • Improve quality
    • Debug & fix
    • Advanced
    • General
  • Payments

    Implement invoice generation and access

    Gives customers proper invoices with sequential numbering, tax details, and self-service download access.

    • Automate workflows
    • Improve quality
    • Intermediate
    • General
  • Payments

    Implement usage-based (metered) billing correctly

    Reports usage to the provider reliably, with local records that survive retries and idempotent submission.

    • Improve quality
    • Automate workflows
    • Advanced
    • General
  • Payments

    Reconcile my books against the payment provider

    Adds a regular check that every provider charge, refund, and payout matches your local records.

    • Automate workflows
    • Plan & validate
    • Advanced
    • General
  • Payments

    Implement refunds that stay in sync

    Handles full and partial refunds with access revocation, idempotency, and records that reconcile.

    • Improve quality
    • Automate workflows
    • Intermediate
    • General
  • Payments

    Model subscription states correctly

    Implements the real subscription lifecycle (trialing, active, past_due, canceled) with access rules per state.

    • Improve quality
    • Plan & validate
    • Intermediate
    • General
  • Payments

    Keep card data out of my servers (PCI scope)

    Confirms card numbers only ever touch the provider's fields and that your systems store nothing PCI-regulated.

    • Plan & validate
    • Improve quality
    • Intermediate
    • General
  • Testing

    Mock Stripe (or my payment provider) in my test suite

    Build a payment provider mock so webhook, checkout, and subscription logic is testable without hitting live APIs.

    • Improve quality
    • Automate workflows
    • Intermediate
    • General
  • Payments

    Stop coupon and discount abuse

    Adds redemption limits, expiry, and new-customer-only rules to discount codes so they cannot be stacked or farmed.

    • Improve quality
    • Debug & fix
    • Intermediate
    • General
  • Payments

    Make my checkout double-submit proof

    Hardens the full checkout path against duplicate orders and charges from retries, refreshes, and racing requests.

    • Improve quality
    • Debug & fix
    • Intermediate
    • General
  • Payments

    Send proper payment receipts

    Sends a receipt for every successful charge with the details customers need for their records and expense reports.

    • Automate workflows
    • Improve quality
    • Beginner
    • General
  • Payments

    Separate test and live payment modes completely

    Locks test keys and live keys to their environments so test charges can't hit real cards and vice versa.

    • Plan & validate
    • Improve quality
    • Beginner
    • General
  • Payments

    Set up basic payment fraud protection

    Configures Stripe Radar rules and app-level checks to block card testers and obvious fraud before launch.

    • Plan & validate
    • Improve quality
    • Intermediate
    • General
  • Database

    Standardize date, time, and timezone handling

    Audits how the app stores and displays dates so users in different timezones stop seeing wrong times and off-by-one dates.

    • Improve quality
    • Debug & fix
    • Intermediate
    • General
  • Database

    Stop storing money as floats

    Finds every money value stored or calculated as a floating point number and converts it to integer cents or a decimal type.

    • Improve quality
    • Debug & fix
    • Intermediate
    • General
  • Payments

    Add Stripe checkout with webhook verification

    Implements a checkout session flow, verifies webhook signatures, and updates order state idempotently on payment events.

    • Ship faster
    • Advanced
    • Cursor
    • General
  • Testing

    Test what happens when things happen at the same time

    Write concurrency tests for double submissions, race conditions on counters, and simultaneous edits.

    • Improve quality
    • Debug & fix
    • Advanced
    • General
  • Testing

    Test my destructive actions: deletes, cancels, and data wipes

    Verify every destructive action confirms intent, handles authorization, and cleans up related data correctly.

    • Improve quality
    • Debug & fix
    • Intermediate
    • General
  • Testing

    Test the full subscription lifecycle end to end

    Walk a subscription through trial, active, past due, upgrade, downgrade, cancel, and win-back in one coherent suite.

    • Improve quality
    • Debug & fix
    • Advanced
    • General
  • Testing

    Test that my webhook handlers survive duplicate delivery

    Prove webhooks processed twice (which providers do on purpose) don't double-charge, double-grant, or double-email.

    • Improve quality
    • Debug & fix
    • Intermediate
    • General
  • Database

    Wrap multi-step writes in transactions

    Finds write flows that touch multiple records and makes them atomic so partial failures can't corrupt state.

    • Improve quality
    • Debug & fix
    • Advanced
    • General
  • Payments

    Never trust client-side prices or totals

    Rebuilds every charge amount server-side from your own price list so tampered requests can't set their own prices.

    • Improve quality
    • Debug & fix
    • Intermediate
    • General
  • Security

    Verify incoming webhooks are genuine

    Adds signature verification to every inbound webhook so forged events can't trigger actions.

    • Improve quality
    • Debug & fix
    • Intermediate
    • General

Want to skip doing this by hand?

Fortivibe audits your app for all of the areas these prompts cover (and more).

See What We Check

More Prompt Packs