Customer Portal

This guide will help you manage invoices and payment methods through the Stripe Customer Portal. It explains how to set up invoice management, enable subscription downgrades, and ensure real-time data synchronization.

Overview

We handle invoice management using the Stripe Customer Portal, which simplifies managing invoices, updating payment methods, and handling downgrades or upgrades.

Workflow

  1. Customer Portal Access: To allow users to manage their invoices, we create a Customer Portal session using stripe.billingPortal.sessions.create API.
  2. Features of the Portal:
    • Users can view and download their invoices.
    • Payment methods can be updated.
    • Users can upgrade or downgrade their plans directly from the portal.
  3. Webhook Integration: As with subscription management, we use Stripe webhooks to resync data in Supabase when changes occur in the Customer Portal. For example, when a user updates their payment method, the webhook triggers a resync to reflect these changes in your app's database.

For more details on managing invoices with Stripe, check out Stripe Customer Management.

On this page