Docs
gift subscriptions, list customers, filter customers
461783
2022-12-28T16:01:50Z
2022-12-28T16:01:50Z
0
0
0
257379
How to not let existing subscribers receive gift subscriptions.
How to stop existing subscribers from receiving gift subscriptions?
Summary :
This article will help you with setting up a process to put a condition on which customers will receive gift subscriptions.
Steps:
1) Customer chooses to buy a gift subscription for a customer and enters the email address of the gift recipient on your website. (your website+your back-end).
2) Using Chargebee APIs, check if this email address has an account and a subscription in Chargebee. (Your backend + Chargebee API).
https://apidocs.chargebee.com/docs/api/customers?prod_cat_ver=2#list_customers to list the customers and apply filters to check if the email address entered by the customer has an account in Chargebee.
3)
i) If yes, do not let the gifter proceed forward to Checkout meaning do not redirect the customer to the subscribe button page.
ii) If not, redirect the gifter to the checkout(Hosted checkout- https://apidocs.chargebee.com/docs/api/hosted_pages?prod_cat_ver=2#checkout_gift_subscription_for_items) where they will pay for the gift subscription for this new email address.
This would help you in not gifting subscriptions to existing subscriptions.