Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

Cover image for How to add the Stripe customer portal to Bubble.io
Stripe profile imageBen Sears
Ben Sears forStripe

Posted on

     

How to add the Stripe customer portal to Bubble.io

Let your customers update payment info, change subscription plans, and download invoices within Bubble apps in this step guide.

byBen Sears, Software Engineer @ Stripe


Image description

Overview

When accepting payment information, many startups have to create interfaces to allow customers to change pricing tiers, update payment information, view past invoices, and cancel subscriptions. These are important features that are time-consuming to build on your own. TheStripe customer portal simplifies these requirements and presents your branded portal for end-users.

Bubble.io is a no-code platform for companies to build fully functional web applications. With a few steps, existing Bubble users can now integrate the Stripe customer portal to support subscriptions through the self-serve interface. This guide covers the steps to get up and running with Bubble and Stripe, no-code required.

Note: You will need to implement Webhooks if changes to a user’s subscription affect the Bubble app’s functionality. For example, cancelled/paused subscriptions should trigger a re-subscribe interface or pricing tier call to action.

Prerequisites:

Image description

Steps

1. Configure the customer portal in test-mode atdashboard.stripe.com/test/settings/billing/portal
2. Create a test mode customer and save thecustomer_id
3. Install theAPI Connector pluginPlugin Installation Page
4. Configure the API calls used to create Stripe customer portal on the “Plugin” page

  • a. The authorization piece should have both theStripe live andtest keys. Specifically, the key value should belive and the development key value should betest. In addition, make sure that each header value starts with “Bearer”. For Example:image or snippet here
  • b. Enter a sample test mode customer_id as the value for customer (this will be needed for initializing the API call)
  • c. The Return URL can be any test URL for now since you will set it dynamically in the workflow in a later step

Image description

5. Clicking on the button to initialize this API call will call Stripe and return back a response, click save on the response, this will be what is interacted with in the workflowCreate portal session

6. Create an element the user will click to be redirected to billing, for example a “Manage Billing” button that is going to send the user to the Stripe Customer Portal
7. Create a new workflow triggered on element click which uses the API defined in earlier steps, and then redirects the user to the URL in the payload

  • a. Step 1 will call the API call defined, entering the current logged in user’s customer_id. Return_URL can be anything, in this example I use the current page, it will determine where the customer gets redirected to when they exit the portal.

Step 1 of the workflow which creates the session

  • b. Step 2 will redirect the user to theurl parameter of the create portal API call madeStep 2 of the workflow which redirects the end-user

8. Testing the payment flowWatch on YouTube

Recap

We hope this guide helps you get your Bubble applications live with the Stripe customer portal. If you want to go deeper in understanding the self-service features available for your projects, check outour docs.

Let us know in the comments if you have any thoughts or questions!

Stay connected

In addition, you can stay up to date with Stripe in a few ways:
📣Follow us on Twitter
💬Join the official Discord server
📺 Subscribe to ourYoutube channel
📧Sign up for the Dev Digest

About the author

Ben SearsBen Sears is a software engineer at Stripe, focused on improving the developer experience for recurring payments (Stripe Billing). Prior to Stripe, Ben was the co-founder ofBillflow, a no-code platform for SaaS pricing interfaces. Based in San Francisco, Ben enjoys building products, playing board games, and going for walks around the city with his chihuahua mix 🐾.

You can follow Ben on Twitter at@bsears_

Top comments(3)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss
CollapseExpand
 
entirelysafe profile image
EntirelySAFE
  • Joined

Hi Ben,

Amazed to be able to communicate with you directly. Saw your videos on Youtube. Recognized owing to white frame of the glasses. Looks awesome.

I have a question. When the user goes to Customer Portal he can not see the options to change the plan, cancel, or even the list of invoices.
Is it because we need to add another param (configuration) to the API call? If yes, what should be keys and values?

Thanks in Advance.
Fuad

CollapseExpand
 
raisinganchors profile image
Cassie
Just a no coder who hates code trying to figure out how implement solutions with the least amount of code.
  • Joined

Hey Ben! Very helpful! Thank you!

I do have a question about customizing the stripe customer portal; as a no code entrepreneur, the Stripe docs do not help me, as it's all a foreign language that I am slowly trying to piece together.

Do you have any videos or material that can walk me through how to customize my API link within the Bubble API connector plugin to give different types of users access to different products? Any help would be enormously appreciated, I can even pay to have someone show me how to do this. Thank you!

CollapseExpand
 
mireya_politron_b443aff91 profile image
Mireya Politron
  • Joined

Thank you for this! I spent 3 days following along different videos and none worked until this! Amazing work :)

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

Stay updated withStripe Developer News. Be the first to hear about product updates and developer resources.

More fromStripe

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp