When a customer visits their portal at /me/[token] and they have a Stripe Customer (i.e. they've paid an invoice via Stripe, saved a card, or are on an autopay contract), they see a 'Manage payment + subscriptions' button above the appointments list. Clicking it opens Stripe's hosted Billing Portal — a secure, Stripe-branded page where they can self-serve.
What customers can do
- Update their saved payment method (replace expired card, add a new one).
- View their full Stripe-side billing history — invoices, receipts, refunds.
- Cancel autopay subscriptions if you've enabled that in your Stripe Billing Portal config (Settings in Stripe dashboard → Billing → Customer portal).
When customers see it
The button only renders when the customer has a `platform_stripe_customer_id` — i.e. there's actually something for the portal to manage. New customers who've never paid an invoice or saved a card don't see it (the button would error if they clicked, since there's no Stripe identity to load).
Auto-emailed when their autopay fails
When an autopay charge fails (declined card, expired card, etc.), the customer gets an email DIRECTLY from Plyrium with a 'Update your payment method' button that goes to their portal. They can self-update the card in 30 seconds; Stripe's smart-retry picks up the new card on the next attempt; service uninterrupted. You don't have to chase them.
Each link is a fresh Stripe session
Every time the customer clicks 'Manage payment + subscriptions', we generate a new Stripe Billing Portal session. Sessions are short-lived (a few hours) — that's by design (Stripe security). Customers don't need to bookmark Stripe's URL; they just click from /me/[token] each time.
Stripe → Settings → Billing → Customer portal lets you toggle what customers can do (update payment method only, or also cancel subscriptions, or also pause). The default is conservative — customers can update card + view invoices but can't cancel without contractor approval. Tune to your taste.