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
On your website, the gifter enters the gift recipient's email.
Use the List customers API to check if that email has an account and subscription in Chargebee.
If the email exists: Do not redirect to checkout. Show a message that the recipient already has a subscription.