> For the complete documentation index, see [llms.txt](https://cranford-tech.gitbook.io/stripe-connect-marketplace/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cranford-tech.gitbook.io/stripe-connect-marketplace/implementing-key-features/splitting-subscription-payments.md).

# Splitting subscription payments

The Stripe Connect - Marketplace enables you to split **subscription** payments between your platform and merchants who are selling goods/services on your platform. For example, if you're running a subscription content marketplace like Substack, the plugin allows your marketplace to take a % of each subscription paid by consumers to newsletter writers.

### Video tutorial

The below video tutorial demonstrates how to split a one-off payment (relevant section is from 12:42 to 20:14):

{% embed url="<https://youtu.be/O0DP2BcxWjM?si=fr5KF8T_x3S_abNs>" %}

### Database Setup

{% hint style="info" %}
You can see an example of a database setup for a subscription marketplace in the below demo app:&#x20;

<https://bubble.io/page?name=index&id=stripeconnectmarketplace&tab=tabs-3&subtab=Data+Types&type_id=subscription>

The fields specific to the subcriptions are 'subscription', 'plan' and 'newsletter'
{% endhint %}

If you are processing subscription payments in your app, it is recommended you create an additional data type called '**subscription**' (or something similar) with the following fields:

<table><thead><tr><th width="218">Name</th><th width="98">Type</th><th>Description</th></tr></thead><tbody><tr><td>cancel at period end?</td><td>text</td><td>a field that lets you know whether the subscription will be ended after the current period</td></tr><tr><td>checkout session id</td><td>text</td><td>the unique ID Stripe gives to each checkout session</td></tr><tr><td>currency</td><td>text</td><td>the currency of the transaction (recommended to use a 3-digit ISO code to be consistent with Stripe requirements)</td></tr><tr><td>customer id</td><td>text</td><td>the unique Stripe ID associated with each customer</td></tr><tr><td>frequency</td><td>text</td><td>the frequency of the subscription (i.e. is it weekly, monthly or annual)</td></tr><tr><td>price</td><td>number</td><td>the price in cents (or equivalent) of the subscription</td></tr><tr><td>product</td><td>product</td><td>the product the subscription is associated with (please note I use 'newsletter' in place of product in my demo app as it is a substack-style marketplace)</td></tr><tr><td>seller account id</td><td>text</td><td>the unique ID of the seller's Stripe account</td></tr><tr><td>subscription status?</td><td>text</td><td>the status of the subscription</td></tr><tr><td>subscription id</td><td>text</td><td>the unique ID of the Stripe subscription</td></tr><tr><td>subscription start</td><td>date</td><td>the date on which the subscription started</td></tr><tr><td>subscription end</td><td>date</td><td>the end date of the subscription</td></tr></tbody></table>

and another data type called 'plan' (or something similar) with the following fields:

<table><thead><tr><th width="174">Name</th><th width="131">Type</th><th>Description</th></tr></thead><tbody><tr><td>cost</td><td>number</td><td>the total value of the transaction (in cents, or equivalent)</td></tr><tr><td>currency</td><td>text</td><td>the currency of the transaction (recommended to use a 3-digit ISO code to be consistent with Stripe requirements)</td></tr><tr><td>frequency</td><td>text</td><td>the frequency of the subscription (i.e. is it weekly, monthly or annual)</td></tr><tr><td>product</td><td>product</td><td>the product the subscription is associated with (please note I use 'newsletter' in place of product in my demo app as it is a substack-style marketplace)</td></tr></tbody></table>

### Free trials

Add a value to the 'Days for Free Trial' field to allow users to benefit from a free trial before their first payment.

For example, if you set it to ‘30’, You user will be given a 30-day free subscription when they initially subscribe:

<figure><img src="/files/Ptqc45gXojiujgSOslU8" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cranford-tech.gitbook.io/stripe-connect-marketplace/implementing-key-features/splitting-subscription-payments.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
