Link to plugin page: https://zeroqode.com/plugin/stripe-marketplace-express-1579425168812x906283616713048000
Creating a web app pretty much always requires an integration of a payment system. These systems might be rather simple or very complex, depending on your type of the app. Stripe is one of the best software platforms for that, whether you’re creating a subscription service, an on-demand marketplace, an e-commerce store, or a crowdfunding platform. Stripe’s meticulously designed APIs and unmatched functionality help you create the best possible product for your users.
Right now the solutions regarding Stripe API that are offered for Bubble users are very limited and require additional developing for the functionalities you want your platform to have. Not to mention that the existing solutions are not very well optimized when it comes to developing a more complex service.
This is where we decided to create a plugin that offers pretty much all the tools for setting up a medium to high complexity payment system with the optimization and the high performance in mind. You won't need to install multiple plugins or developing additional basic functionalities that other plugins are lacking. Also we minimized the number of action calls to the minimum for achieving a faster performance and a more clean workflow.
First you will need to go to stripe.com and register an account.
After you have successfully verified your email address and activated your account, under the Activate your account tab, you can start setting up stripe features you need.
After that you will need to setup the keys for the plugin. To find the keys go to your stripe dashboard and find API keys under the Developers tab. You need to copy the Publishable and Secret keys both for live and development versions. Make sure when adding the secret keys to the plugin to add text 'Bearer' before the key (do this just for the secret key).
Also make sure you have enabled stripe Connect.
This plugin has only one element called Stripe Marketplace Token. It is used for creating a bank account or card token.
Using the Stripe Marketplace Token you can create:
a credit card token
a bank account token
To use the token you will have to add another workflow that will run when the token is created. There you can use the token to create a customer and assign him a credit card, creating a stripe seller or making a payment using the token you have created.
Also you can add an additional workflow that will check for the errors during the token creation thus giving you the option to setup a custom solution for the users.
So this is one of the main calls that was kept in mind during the developing of the plugin. It provides the ability of creating a stripe custom account with all the necessary fields needed for it to be verified from the start, tho you have the choice of not filling in all the fields present there. This action call should be used only when creating accounts for individuals. Before creating a custom account you might want to create a bank account token first and use it so the created account has a bank account attached to it from the start. Also some of the fields are region related (should be filled in for US only accounts) so check each field's documentation.
It's almost the same as the Create a seller - Individual the difference being that it is used for updating an account. Also it has one extra field which is required and that is the ID of the account you want to update. Use this action call for setting up an account verification flow, so users could create an account but if some of their submitted info failed stripe verification they could resubmit it again.
This action call is also used for creating a stripe custom account but it should be used only when creating accounts for companies. Also it is required you use the Create a person action call so you can add executives, representatives and owners to the created account.
It's almost the same as the Create a seller - Company the difference being that it is used for updating a company account. Also it has one extra field which is required and that is the ID of the company account you want to update. Use this action call for setting up a company account verification flow, so users could create a company account but if some of their submitted info failed stripe verification they could resubmit it again.
As described above this action call is used to add executives, representatives and owners to a custom account that is of a company type.
This action call is used to update details of a person linked to a specific company. You need to provide the ID of the company and of the person that must be linked to the specified company.
This action call gives the option for the admin to delete users that are connected to the platform. Tho it should be used only when deleting testing sellers and not the real ones.
Using this action call you can encrypt a government issued identification document of a user to be sent with the Create a seller/Update a seller action call for verification. You will need to use this call two times to create two versions of the document, one from the front and one from behind and use the resulted ID in the Create a seller/Update a seller action call.
This action creates a customer on the platform. Before creating the customer you should create a card token to be used in this action call, that will become the customer's default source, tho you can do it later using the Update a customer call. You need to store the ID of the added card source for later use.
Update a customer action call gives the option to change the details of a customer. It's main use tho would be to replace the default source of a customer (which means that a new source object will be created, that will become the new customer default source, and the old source will be deleted if one exists). You need to store the ID of the added card source for later use.
This action call is used to add a card to a customer. The added card will just be added to the list of cards the customer has without replacing others (it will become the default source card only if the customer has no cards). You need to store the ID of the created card for later use.
Delete a card action call is used to delete a card from a customer. If you delete a card that is currently the default source, then the most recently added source will become the new default.
Using this action call you can delete destination bank accounts from a custom account. Make sure to add another bank account using the Update a seller call.
This action call is used for charging customers as the platform. It means that you as the platform owner will charge other people and the money will be sent to your account.
This action call gives the option for stripe accounts connected to your platform to charge customers while you as the platform owner will receive a fee from that transaction. The source for this action call needs to be the resulted ID from the Link a customer to seller call.
As described above this action call is used when a connected custom account needs to charge a customer. If the customer doesn't have a card source you should add one first and then use it's ID in this action call. Also this call gives the option for customers to use a card from their list of saved cards . To retrieve the list of a customer's cards use the Retrieve a customer action call.
Retrieves the details of an existing customer. You need only supply the unique customer identifier that was returned upon customer creation.
Retrieves the details of an account. The type of the stripe account doesn't matter you can also get information about standard or express accounts that are connected to your platform.
Returns a list of charges of a connected account. The charges are returned in sorted order, with the most recent charges appearing first.
Returns a list of existing payouts sent to third-party bank accounts or that Stripe has sent to a connected account. The payouts are returned in sorted order, with the most recently created payouts appearing first.
Creates a new subscription on an existing customer. Before subscribing customers to plans make sure you have created some plans in your stripe dashboard and use the ID of the plan you want the customer to subscribe to. To create a plan you need to go to Stripe dashboard -> Billing -> Products and create a product to which you can then attach a plan.
Updates an existing subscription to match the specified parameters. This action call has multiple uses depending on what fields you fill in.
Update a subscription action call gives you the option to:
Change the plan /* If you want to replace the current plan of a customer with another you will have to fill in these fields: Subscription ID, Subscription item ID and the Plan ID of the new plan you want to subscribe the customer to.*/
Add additional plans /* A customer can be subscribed to multiple plans. To add an additional plan to a customer you will need to fill in these fields: Subscription ID, and the Plan ID . This will create another Subscription item ID so make sure you store it somewhere for later use.*/
Change the billing source /* If you want to change the default billing source for a customer's subscription you will need to fill in the Card ID field with and existing card ID from that customer.
Cancel the subscription /* To cancel an existing subscription at the end of the current billing period just fill in the Subscription ID and Cancel at the period end fields.*/