Payments and billing playbook
Rules for taking money in a web app or SaaS through a payment provider. Checkout, orders, webhooks, subscriptions, refunds, disputes, tax and invoices.
- Required 29
- Recommended 45
A payments playbook for any web app, shop or SaaS that takes money through a payment provider such as Stripe, Adyen, Mollie or Paddle. It covers card security, price display and consumer law, amounts and orders, payment events, subscriptions, failed payments, refunds and disputes, tax and invoices. The last chapters cover marketplaces and payouts, currencies and settlement, and bank transfers and local payment methods. It is written for the developers and AI agents who build billing, and for owners who must trust it.
Money bugs cost twice. A double charge loses a customer, and a missed refund or a wrong invoice can break the law. Each rule here has a check that fails before a customer notices. Legal dates and limits were checked against the official texts in October 2026. This playbook is not legal or tax advice, so confirm with an accountant which rules apply to you.
Start with Card security and SCA. It decides how much card security work you carry. Then read Amounts and orders before you write any code that stores a price.
Some topics have their home elsewhere. Security tests for payments live in abuse and limits. Webhook signing and retries live in webhooks and events. Database transactions live in the data playbook. This playbook links to them and covers the payment side. Metering, credits and spend caps for usage plans live in the usage-based billing playbook.
Chapters
Card security and SCA
Let the provider hold card data, guard the scripts on payment pages, handle 3-D Secure and its exemptions, and test every outcome with test cards.
- Required 5
- Recommended 3
Price display and consumer law
Show the full price, label the order button, give honest discounts, never surcharge EU consumer cards and honour the EU right of withdrawal.
- Required 7
Amounts and orders
Hold money as integers with a currency, freeze what the customer agreed to, move orders through fixed states and never charge the same order twice.
- Required 1
- Recommended 5
Payment events and reconciliation
Let verified provider events move orders, catch the events you missed, keep an append-only ledger and match every payout to the cent.
- Required 2
- Recommended 7
Subscriptions
Let the provider run renewals, give access from one status check, get clear consent, remind before charges and make cancelling as easy as signing up.
- Required 3
- Recommended 2
Failed payments and dunning
Retry only declines that can succeed and only on a fixed schedule. Ask the customer to fix the card, and keep saved cards current.
- Recommended 4
Refunds, disputes and fraud
Refund through the provider once and on time, answer every dispute with evidence, watch the dispute ratio and stop card testing before it starts.
- Required 1
- Recommended 7
Tax
Calculate tax with a service, keep proof of where each customer is, charge EU VAT by country, check VAT numbers and watch US nexus thresholds.
- Required 3
- Recommended 4
Invoices and records
Number invoices without gaps, include every required field, correct with credit notes, send e-invoices where required and keep records for the legal period.
- Required 4
- Recommended 2
Marketplaces and payouts
Let the provider verify sellers before they sell and report their income where the law asks. Settle who pays refunds, and explain every payout.
- Required 2
- Recommended 4
Currencies and settlement
Set a price per currency and record the rate and settled amount of every charge. Refund in the currency paid, and convert money only once.
- Required 1
- Recommended 4
Bank transfers and local methods
Offer the payment methods each market uses, put a checked reference on every bank-transfer invoice and send payouts with the payee's exact name.
- Recommended 3
Rules from regional law
Most rules here hold for every project. The rules below come from the law of one region. Follow them when your project serves people there.
European Union (EU)
- Required PAY-2 Handle 3-D Secure in every card flow
- Required PAY-7 Say on the order button that the order costs money
- Required PAY-58 Show the total price with every mandatory fee
- Required PAY-9 Show the lowest earlier price beside a discount
- Required PAY-16 Never add a fee for paying by EU consumer card
- Required PAY-74 Offer pay later through a licensed lender
- Required PAY-59 Get consent before digital content or a service starts early
- Required PAY-33 Add the EU withdrawal button
- Required PAY-28 Show the terms and record consent before the first charge
- Required PAY-39 Refund EU withdrawals within 14 days
- Required PAY-48 Charge EU VAT by the customer's country
- Required PAY-49 Reverse-charge B2B sales with a checked VAT number
- Required PAY-75 Sell gift cards as vouchers with the right VAT and expiry
- Required PAY-52 Number invoices in one unbroken sequence
- Required PAY-53 Put every required field on the invoice
- Required PAY-55 Send e-invoices where the law requires them
- Required PAY-62 Report seller income to the tax authority
- Required PAY-70 Never offer home-currency conversion without showing the mark-up
- Recommended PAY-79 Send bank payouts and refunds with the payee's exact name
United Kingdom (UK)
- Required PAY-2 Handle 3-D Secure in every card flow
- Required PAY-32 Let people cancel online as easily as they signed up
United States (US)
- Required PAY-58 Show the total price with every mandatory fee
- Required PAY-28 Show the terms and record consent before the first charge
- Required PAY-32 Let people cancel online as easily as they signed up
- Required PAY-75 Sell gift cards as vouchers with the right VAT and expiry
Norway (NO)
- Required PAY-55 Send e-invoices where the law requires them
Germany (DE)
- Required PAY-32 Let people cancel online as easily as they signed up
California (US-CA)
- Required PAY-28 Show the terms and record consent before the first charge
- Required PAY-29 Remind people before a trial or renewal charges
- Required PAY-32 Let people cancel online as easily as they signed up
This is a lot to check. An Expert can check it for you.
Related playbooks
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/payments">Agent Wranglers payments and billing playbook</a>. In code you write, add a comment next to it with the same link.