Billing.js
  • Introduction
  • Features
  • Getting started
    • Installation
    • Add to your app
      • Wrap your app
      • Setup Pricing page
      • Setup Customer Portal
    • Configure Webhooks and Triggers
      • Subscription webhook
      • Customer Webhook
      • New user trigger
  • Guides
    • Single Sign-On
    • Shared subscriptions
    • Local currency support
    • Automatic Dispute Response
  • Components
    • <BillingProvider />
    • Pricing Page
      • <PaymentField />
      • <PaymentSummary />
      • <PromotionCode />
      • <PaymentModal />
    • Customer Portal
      • <CustomerProfile />
      • <Subcriptions />
      • <ManageSharedSubscriptionModal />
      • <PaymentMethods />
      • <Invoices />
  • Hooks
    • useAuth
    • useProducts
  • Methods
    • Product
      • getProducts
    • Customer
      • getCustomerSubscriptions
      • getCustomerPaymentMethods
      • getCustomerInvoices
    • Subscription
      • addSubscription
      • cancelSubscription
      • updateSubscription
    • Payment Method
      • attachPaymentMethodToCustomer
      • detachPaymentMethodFromCustomer
      • setPaymentMethodAsDefault
    • Shared Subscription
      • getSharedSubscription
      • getSharedSubscriptionUsers
      • updateSharedSubscriptionUsers
Powered by GitBook
On this page
  • Shared subscription products
  • Shared subscription owners
  • Shared subscription user/manager

Was this helpful?

  1. Guides

Shared subscriptions

PreviousSingle Sign-OnNextLocal currency support

Last updated 2 years ago

Was this helpful?

Shared subscription are supported using metadata on Stripe products and customers

For your app to support shared subscriptions you will have to implement the customer and subscriptions webhooks. .

Shared subscription products

To make a product support shared subscription add on the product page the following metadata:

billing_supports_shared_subscriptions = true

You can see your list of active products on the .

This will ensure that users who subscribed to this product will be able to add/remove users to their subscriptions from their customer portal. They will be able to set users as managers of the shared subscription too.

Check that the metadata billing_supports_shared_subscriptionsdoes not contain any trailing whitespace as Stripe does not sanitize the metadata

Shared subscription owners

This is automatically set when the customer is using the

These instructions are only here to help you set up a shared subscription manually from the

A shared subscription always has an owner that can manage it from his customer portal

To manually set a Stripe customer as the owner of the subscription, add the following metadata to the subscription from the Stripe Dashboard

billing_shared_subscription_owner = cus_***

where cus_*** is the customer id of the owner

Shared subscription user/manager

The owner of the shared subscription doesn't need this metadata

To manually set a Stripe customer as a user/manager of a shared subscription, add the following metadata to the customer who is sharing the subscription (not the owner) from the Stripe Dashboard

billing_shared_subscription_role = user or manager

A manager can add/remove users from the shared subscription just like the owner. There can be only one owner for a shared subscription.

A user can't edit the subscription

billing_shared_subscription_id = sub_***

Where sub_*** is the subscription id of the shared subscription.

This will ensure that the customer is on the shared subscription and this will consume one license from the shared subscription plan.

Please note that if you add more users to a shared subscription than the number of licenses on the subscription, the subscription won't be updated accordingly and the owner won't be charged more. You will have to update the shared subscription manually.

This is automatically set when the customer is using the

These instructions are only here to help you add a user to an existing shared subscription manually from the

Configure them here
Configure Webhooks and Triggers
Stripe dashboard
Customer Portal
Stripe dashboard
Customer Portal
Stripe dashboard