Setting up billing with Stripe
With accounts and email working, the next piece was taking payments. I set up Stripe, which handles cards, receipts, and subscriptions.
How billing works
- Pick a plan and pay on the site. The payment form is embedded in the page, so you never leave TCG Marquee.
- Monthly or yearly. Collector is $4 a month or $40 a year, Pro is $9 or $90, and Screen is $6 or $60.
- Manage billing opens Stripe's own portal, where you can update your card, switch plans, or cancel.
- Stripe tells the server what happened, through signed messages called webhooks, so your plan changes the moment a payment goes through or a subscription ends.
Testing without real money
Stripe has a sandbox with test cards. I built and tested everything there, with a separate test account, before anything could charge a real card. Along the way I accidentally switched my Stripe account out of sandbox mode while exploring tax settings, which is a good reminder of why the sandbox exists.