Introduction
This documentation will go over how to setup Stripe Connect (marketplace) payments using Checkout in your Bubble app.
Last updated
This documentation will go over how to setup Stripe Connect (marketplace) payments using Checkout in your Bubble app.
Last updated
This plugin contains all the workflow actions and data calls to let your user connect their Stripe account and create marketplace payments & subscriptions while taking a platform fee.
Demo page (editor is public):
Plugin page:
My contributor page:
Questions, bug reports or feature requests? You can message me on the Bubble Forum: @thimo or shoot me an email (you can find my email on ).
Connect with me on .
First, make sure to add the plugin to your Bubble app. Inside this step-by-step documentation we will implement the plugin from scratch. Below you will find a summary of the most important steps. You can see the demo page here:
Stripe Connect - Checkout Single Payment
Stripe Connect - Checkout Subscription Payment
Refund Charge
Perform Manual Payout
Cancel a Subscription
Create Stripe Account
Create Account Link
Update Payout Schedule for Express Account
Create Express Dashboard Link
The plugin contains the following data calls:
GET Checkout Session Details
GET Payment Intent Details
Retrieve Stripe Account
Retrieve Connected Account Balances
GET Subscription details
List Invoices For A Subscription
GET Charge details
GET Balance Transaction details
Below is a quick summary of the most important steps we will be performing to implement marketplace payments using the plugin in your Bubble app. Visit the other pages in this documentation to read a step-by-step instruction.
First we will create a Stripe account using a workflow action and we will save the returned Account ID to the database.
Next we will go over how to use a workflow action to create an 'Account Link' to connect the Stripe account from your user to the created account from step 1. This account link will redirect your users to a Stripe Onboarding flow to connect their Stripe account.
When onboarding is completed, the user will be redirected to your specified 'Return URL' and we will perform the 'Retrieve Stripe Account' data call with the Account ID to check if charges_enabled
parameter is set to true which means that the onboarding succeeded for the user.
One-time marketplace payments
First we will use the 'Stripe Connect - Checkout Single Payment' workflow action to generate the Checkout URL for a one-time payment and save the Checkout ID and Payment Intent ID to the database. Inside this workflow action we specify the Account ID of the user that will receive part of the payment and a fee percentage that you (the platform) will receive. You also need to specify a 'Success URL' where the user will be redirected after completing the payment.
Next we will redirect the user to that Checkout URL to let the user perform the payment.
The user will be redirected to your 'Success URL'. Note: we still need to check if the payment is successful.
To check if the payment is successful, we need to run the 'GET Payment Intent Details' data call. The Payment Intent ID necessary for this call is saved in step 1. Next we look at the charges
object and select the first item to see if it is paid. You can display / use this information how you like in your app!
Subscription marketplace payments
First we will use the 'Stripe Connect - Checkout Subscription Payment' workflow action to generate the Checkout URL for a subscription and save the Checkout ID to the database. Inside this workflow action we specify the Account ID of the user that will receive part of the payment and a fee percentage that you (the platform) will receive. You also need to specify a 'Success URL' where the user will be redirected after completing the subscription.
Next we will redirect the user to that Checkout URL to let the user create the subscription.
The user will be redirected to your 'Success URL'. Note: we still need to check if the subscription is successfully created.
To check if the payment is successful, we need to run the 'GET Checkout Session Details' data call. The Checkout ID necessary for this call saved in step 1 to the database. Next we can look at the subscription parameter and check if it contains a value (Subscription ID). Once it is not empty you know that the subscription has succeeded. Make sure to save the Subscription ID to your database. You can display / use this information how you like in your app!