How to create Stripe Express accounts for merchants in your marketplace app (Stripe Connect Tutorial)

Note: this tutorial assumes you have already registered for a Stripe account. You’ll need to have added your business name, icon and brand color in the Connect Settings section of your Stripe dashboard

  1. Install the Stripe Connect - Marketplace plugin

2023-04-17 08.33.46

Note: in steps 2-4 I’m putting my API keys into the live section of the Stripe Connect Plugin. If you want to test the plugin out in dev mode (which I recommend you do!), follow the same format and put your test keys into the "- dev. " fields

  1. Insert your Stripe Secret API key into the “API Key” input box of the plugin page. IMPORTANT: ensure you have “Bearer” before the actual key itself in the input box. So your key should be like this: “Bearer sk_test_xxxx”

2023-04-17 08.40.03

  1. Insert your Stripe Publishable key into the “Stripe Publishable Key” input box of the plugin page. It should begin with “pk_”.

2023-04-17 08.41.12

  1. Insert your Stripe Secret key into the “Stripe Publishable Key” input box of the plugin page. It should begin with “sk_”.

2023-04-17 08.42.19

  1. Add a “Stripe Account ID” field to the user data type in your database (type text)

2023-04-17 08.45.00

  1. Trigger the “Stripe Connect - Create Express Account” workflow action. This will typically be triggered as part of a merchant sign-up flow or via a button on the merchant dashboard. In this example, we’re signing the user up as a seller and then triggering the “Stripe Connect - Create Express Account” action.

2023-04-18 08.12.33

  1. Select the country for your user, their email and the payout interval (how often they get paid out via Stripe). All of this can be done dynamically. In this example, we’re taking the current user’s email and using that.

2023-04-18 08.13.58

  1. Add a workflow action that “makes changes to the current user”. Add the Stripe Account ID created in Step 1 to the user’s Stripe Account ID field.

2023-04-18 08.24.01

  1. Add the “Stripe Connect - Create Onboarding Link” action to the workflow. This is going to create a link that we’ll navigate to in the next step. The “Account” is going to be Stripe Account ID we’ve saved down the current user. The Refresh URL is the URL the user will be redirected to if the account link has expired or is otherwise invalid. In this example, we’re adding a “?refresh=true” parameter to the end of the homepage URL of our demo app. Similarly the “Return URL” is the URL the user is directed to after successfully going through the Stripe onboarding process. We’ll add a “?return=true” parameter to the homepage URL for when the user successfully completes their onboarding process.

2023-04-18 08.32.28

  1. Navigate to the link we just created using the “Open an external website” action.

2023-04-18 08.36.29

  1. Now when a user signs up to your bubble app, they’ll be redirected to the Stripe onboarding portal.
    Note: the demo app I’m using below is called Qualified

2023-04-18 08.41.23

  1. Once your user successfully the onboarding process they’ll be redirected to the “Return URL” you specified in step 9. Your users will only be able to accept charges via Stripe if they’ve filled out all the necessary information on the Stripe onboarding portal. Sometimes they won’t do this because… well people don’t always do what they’re supposed to :slight_smile: With that in mind I suggest you do the following…

  2. Create a field for users in your database called “Charges enabled?”

2023-04-18 20.03.53

  1. Go back to the “Return URL” of your app and add a workflow action on page load that uses the “Stripe Connect - Retrieve Account Details” API call that comes with the plugin. Use this action to change the “Charges enabled?” for the user to “yes” if they have indeed given all the relevant information to Stripe.

2023-04-18 20.06.17

The final step in action:

2023-04-18 20.16.32

Other resources:

1 Like