Group
  • 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

Free Prompt

Audit every payment flow in my app for client-trusted amounts. Find each place a charge is created and check where the amount, currency, and item list come from. The rule: the client sends only identifiers (product ID, plan ID, quantity), and the server looks up the price from its own data (database price list, the payment provider's price objects) and computes the total itself. Any amount, discount, or total arriving from the request body must be ignored or treated as a display hint that's re-verified. Apply the same rule to coupons and discounts: validate them server-side against active rules (expiry, usage limits, eligible products), not against a flag the client sends. Check cart math too: the server recomputes line items, tax, and shipping rather than summing client-provided line prices. Don't change the checkout UI or the displayed prices. Don't remove client-side totals used for display; just stop charging based on them. Deliver: each charge creation point, where its amount came from before, the server-side lookup now in place, and a tampering test: modify the price in the browser's network request (or send a crafted request with a lower amount) and confirm the charge uses the real price or gets rejected.

What This Does / How This Helps

Moves every price decision to the server, so what the customer pays comes from your data and never from what their browser says. This is the most direct way to lose money in a vibe-coded store: the checkout posts { amount: 4999 } and the server charges it. Anyone can open dev tools, change the amount to 1, and buy your product for a penny. It requires no skill, and people probe for it routinely. The tampering test is the proof: replay the checkout with a doctored amount and watch the server charge the real price.

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

Related Prompts