Through Connect, business models such as marketplaces and software platforms can use Stripe Billing to support recurring subscriptions. For example:
- In addition to powering payments, software platforms can also create subscriptions for their end users.
- Marketplaces may support subscription membership in addition to one time purchases.
You can create subscriptions for connected accounts, which supports several approaches for collecting payments. Subscriptions can be created directly on the connected account using direct charges, or on the platform with transfers to the connected account using destination charges. You can also take an application fee percentage on those subscription payments.
Using subscriptions with Connect has these restrictions:
- Your platform can’t update or cancel a subscription that it did not create.
- Your platform can’t add an
application_fee_amountto an invoice that it didn’t create, nor to an invoice that contains invoice items the platform didn’t create.
Creating a subscription using direct charges
To create a subscription that directly charges on a connected account, make a create subscription call while authenticated as the connected account. For this to work, both the customer and the price must be defined on the connected account.
For an end-to-end example of how to implement a subscription signup and payment flow in your application, see the fixed-price guide.
As with creating a direct charge on a connected account, you can create a customer on a connected account using either the platform’s publishable key or the connected account’s publishable key. You can also create a token using shared customers. When using direct charges, the connected account is responsible for the cost of the Stripe fees, refunds, and chargebacks.
Creating a subscription using destination charges
To create a subscription that charges on the platform and creates automatic transfers to a connected account, make a create subscription call while providing the connected account ID as the
For this to work, both the customer and the price must be defined on the platform account, and the connected account token must be created using the platform’s publishable key. If charging a customer, the customer must exist within the platform account. When using automatic transfers, the platform is the business of record.
Collecting fees on subscriptions
When creating or updating a subscription, you can optionally specify an application_fee_percent. This must be a non-negative decimal between 0 and 100, with at most two decimal places.
Once each billing period, Stripe takes this percentage of the final invoice amount—including any bundled invoice items, discounts, or account balance adjustments—as a fee for the platform. This deduction is made before charging any Stripe fees.
This example shows
application_fee_percent for subscriptions that use direct charges on connected accounts:
This example shows
application_fee_percent for subscriptions that use destination charges:
Calculating application fee percent
To see how
application_fee_percent is calculated, consider this scenario:
- A subscription costs 30 USD per billing cycle.
- There’s a 10 USD invoice item on the next invoice.
- A 50% coupon applies.
In this case, the total application fee is 2 USD: (30 USD + 10 USD) * 50% * 10%.
Percent fees and flat fees
Application fees on subscriptions must normally be a percentage, because the amount billed with subscriptions often varies. You cannot set a subscription’s recurring application fee as a flat amount.
However, you can charge a flat
application_fee_amount on an invoice, as explained in the next section. Also, the
application_fee_percent parameter does not apply to invoices created outside of a subscription billing period. For example, it does not apply to proration invoice items that are immediately invoiced. In these cases, you should directly set an
application_fee_amount on the invoice for the amount you’d like to charge.
Working with invoices created by subscriptions
Each cycle, subscriptions create invoices and invoices create charges. For more information about subscription cycles, see the subscription lifecycle. To charge a flat or dynamic fee that can’t be automatically calculated with
application_fee_percent, add an
application_fee_amount directly on each invoice created by the subscription.
This example shows an
application_fee_amount for an invoice with a direct charge on the connected account:
This example shows an
application_fee_amount for an invoice with a destination charge:
To automatically charge an
application_fee_amount, create a webhook that listens for the
invoice.created event. You can also do this manually by creating an invoice for pending invoice items, and setting an application fee on it.
application_fee_amount set directly on an invoice overrides any application fee amount calculated with
application_fee_percent, and is capped at the invoice’s final charge amount.
gates: subs_on_behalf_of: required: false