Docs

Log into read the version of docs relevant to your site.

How to not let existing subscribers receive gift subscriptions

Problem Statement

You want to block gift subscriptions from being sent to existing subscribers. Only new customers should be eligible to receive gifts.

Solution

Check whether the gift recipient's email already exists in Chargebee before allowing checkout. If it does, block the gifter from proceeding. If it does not, allow checkout for the gift subscription.

Steps to Set It Up

  1. On your website, the gifter enters the gift recipient's email.
  2. Use the List customers API to check if that email has an account and subscription in Chargebee.
  3. If the email exists: Do not redirect to checkout. Show a message that the recipient already has a subscription.
  4. If the email does not exist: Redirect the gifter to the Checkout gift subscription for items hosted page to complete the gift purchase.

Was this article helpful?