How to set up per-seat subscription with Stripe?

How to set up per-seat subscription with Stripe?

Problem Description:

Good day!

I am trying build a per-seat subscription model for my web site.
Before, I tried use Checkout session to provide "place", to write personal data, but the max what I reached – is creating default Subscription that you could cancel for instance.

What I wanna do?

• Figure out, if possible, how to create per-seat subscription through Checkout session and after, on event "User joined" automatically replace new price of the subscription.

• If through Checkout session that is not possible, how to implement it through code?
How to get a user’s card and how to upgrade later the subscription.

I read the article on Stripe, but from that I can’t figure how I get client data as card.

In addition, I use Stripe Extension on firebase with cloud functions.

Hope, this problem will be solved 🙂

Solution – 1

You can create a per-seat type subscription with Stripe Checkout. For that, you need to have a recurring price, just as the article suggests. Then pass the price into line_items property when creating a subscription, along with the initial quantity. For example, a customer might want to purchase 5 seats/licenses right away. You can also enable adjustable_quantity setting to allow the user to change the quantity on the Checkout Session page.

When a new user joins, use the Update Subscription API to change the quantity of the item. For example, if the new total number of users you are serving is 11, set the quantity of the price to 11. More info here.

If you don’t want to use Stripe Checkout, you can create a subscription via API, by following this guide. The upgrade step looks the same as in the other solution.

Besides that, Stripe has a Billing Customer Portal that allows users to modify their subscriptions, it’s worth taking a look.

Rate this post
We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.