AddThisFeature

Billing Portal

Let people manage their own subscription.

moderate Monetization

What it adds

A billing area where users can see their plan, change payment method, get invoices, and cancel.

What your agent is told to do

4
  1. 1

    Use the payment provider's hosted billing portal if it has one. Do not rebuild card management — it's a PCI liability you don't need.

  2. 2

    Show the current plan, renewal date, and payment method on your own account page.

  3. 3

    Make cancelling possible without emailing support. Dark patterns here generate chargebacks.

  4. 4

    Treat the provider's WEBHOOKS as the source of truth for subscription state, never the browser redirect.

Edge cases it handles

4
  • A user returning from checkout before the webhook lands must not see a wrong plan — handle the gap.
  • A failed renewal must downgrade access on a defined schedule, not instantly and not never.
  • Cancelling should preserve access until the end of the paid period.
  • Webhooks must be signature-verified and idempotent — they retry and arrive out of order.

Definition of done

7
  • Card details are handled entirely by the payment provider.
  • Subscription state is driven by verified webhooks, not redirects.
  • Webhook handling is idempotent and order-independent.
  • Users can cancel without contacting support.
  • Cancelled users keep access until the period they paid for ends.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.