Can I restrict having one subscription per customer?

Modified on: Thu, 1 Oct, 2020 at 11:42 AM


You can restrict users from creating multiple subscriptions and customer records with the same email address using Chargebee’s checkout page in the UI or the API.

If you are using Hosted Pages: Disable “Allow customers to have multiple subscriptions” and make “Email” field mandatory in the Checkout & Self-serve portal. Refer to this article for a detailed explanation.

If you are using APIs:

To restrict users from signing up more than 1 subscription,

  1. On your sign up page, collect the customer's email ID as a primary check.

  2. Once the customer submits their email ID, use our List Customers API, with the email[<operator>]filter parameter to check for any customer record in Chargebee with the same email ID.

  3. Now that you have the customer ID, use our List Subscriptions API, with the customer_id[<operator>]filter parameter to check for any subscription record in Chargebee associated with the customer ID. 

Note: You can also use the status filter parameter to fetch only the active subscriptions.
    1. If the response returns with a subscription ID, then the customer already has an active subscription.

      1. You can display a message on your web page, informing the customer on the same and stop them from accessing the checkout.

    2. If there are no subscription IDs with a response then the customer has no active subscription and they can access the checkout page.

The above workflow requires development effort at your end. Contact support to know more.

Related articles and Documentation

How to move a subscription from one customer to another?

How do I get yearlong subscriptions where a customer has to pay us monthly but for 12 months minimum?

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.