Splitting one-off payments
Last updated
Last updated
The Stripe Connect - Marketplace enables you to split payments between your platform and merchants who are selling goods/services on your platform. For example, if you're running an eCommerce marketplace like Etsy, the plugin allows your marketplace to take a % of each sale made by sellers on the marketplace.
The below video tutorial demonstrates how to split a one-off payment (relevant section is from 18:42 to 35:50 on):
There are 5 workflow actions involved splitting a one-off payment: 1. Create a new data type called "Transaction" - this is a data type created to record details of each transaction.
You can of course use another custom data type to record details. See the 'Saving down details of a transaction' section of the documentation for full instructions on how to record details of a transaction and the database setup of the Checkout Session page for an overview of setting up your database.
2. Create a checkout session using the "Stripe Connect - Create Checkout Session" workflow. When inputting the "Success URL" and "Return URL" fields, include a page URL parameter that contains the transaction's unique ID. 3. Save the "Checkout Session ID" of the transaction to your transaction. 4. Navigate to the Stripe Checkout Session URL created in step 1 5. (OPTIONAL) Create a workflow that runs on page load ONLY when the transaction page URL parameter you created in step 1 is NOT empty. I typically use this workflow and the "Stripe Connect - Retrieve Checkout Session Details" API call to update the various fields associated with the "transaction".
You can view an example of the database setup and workflow actions in the demo app at the below link (relevant section is the 'Creating Stripe checkout sessions (one-off payments)' section):
The editor is public and can be accessed by clicking the 'View Editor' button at the top of the page.