Skip to content
Sign in
An image of the Stripe logo
/
Create account
Sign in
Home
Payments
Finance automation
Banking as a service
Developer tools
No-code
All products
Home
Payments
Finance automation
Home
Payments
Finance automation
Banking as a service
Developer tools
Overview
Building your integration
Developer tools
    Test mode
    Stripe Shell
      Get started
      Keyboard shortcuts
      Product tutorial
      Checkout tutorial
      Manage subscription tutorial
    Stripe CLI
    Dashboard
    Stripe for Visual Studio Code
    Webhooks
    File uploads
    Feedback
SDKs
API
Security
Sample projects
Videos
Stripe Apps
Stripe Connectors
Partners
HomeDeveloper toolsStripe Shell

Manage subscription tutorial using the Stripe Shell or CLI

Learn how to create a customer portal that allows customers to manage an existing subscription using the Stripe Shell or CLI.

This tutorial shows you the steps and APIs to create a customer portal that allows customers to manage an existing subscription using the Stripe Shell or the Stripe CLI.

Before you begin

  • You need a customer identifier which you can get from the Subscription checkout tutorial using the Stripe Shell or CLI.

APIs used

  • Uses Create a portal session where a customer can manage their subscription.

Create a customer portal Prebuilt

  1. Call Create a portal session to create a customer portal.
Command Line
stripe billing_portal sessions create \ --return-url="https://example.com/account" \ --customer=
{{CUSTOMER_ID}}
  1. Look for the URL (in url) in the response. Open the URL in your browser.
{ "id": "bps_0KoLXR589O8KAxCGHaXfKhNu", "object": "billing_portal.session", "configuration": "bpc_0IGZMD589O8KAxCGs2aHWVmz", "created": 1649915297,

If you’re using the Stripe Shell, click the URL to open the page in a new browser tab.

Watch a video recap

This animated gif shows the customer portal flow in this tutorial using the Stripe Shell.

Wrap up

This is where we wrap up our tutorial. Here are a few places you could turn next:

  • Learn more about how to change existing subscriptions.
  • Start your integration with the Prebuilt subscription page with Stripe Checkout.
Was this page helpful?
Need help? Contact Support.
Watch our developer tutorials.
Check out our product changelog.
Questions? Contact Sales.
Powered by Markdoc
You can unsubscribe at any time. Read our privacy policy.
On this page
Before you begin
APIs used
Create a customer portal
Watch a video recap
Wrap up
Products Used
Checkout
Billing
Stripe Shell
Test mode
Welcome to the Stripe Shell! Stripe Shell is a browser-based shell with the Stripe CLI pre-installed. Log in to your Stripe account and press Control + Backtick (`) on your keyboard to start managing your Stripe resources in test mode. - View supported Stripe commands: - Find webhook events: - Listen for webhook events: - Call Stripe APIs: stripe [api resource] [operation] (e.g., )
The Stripe Shell is best experienced on desktop.
$