#gaurav_api

1 messages ¡ Page 1 of 1 (latest)

regal roseBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1234388479077646431

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

shrewd isleBOT
median plinth
#

Hi there, so you want to conditionally apply a one-time discount when creating a subscription?

lusty latch
#

Above are the addons, which I am offering along with the main service

#

I want to offer 10% off on any addon selected by the customer at the time of sign up

median plinth
#

https://docs.stripe.com/api/coupons/create you can use this API to create a coupon with duration set to once, so that you can apply this coupon in the subscription creation API when your customer fulfill the criteria.

lusty latch
#

Can this be done specifically for add-ons only and not the main service subscription

median plinth
lusty latch
#

Thank you, I will review this info and messahe back if I need more help

#

you can use this API to create a coupon with duration set to once, so that you can apply this coupon in the subscription creation API when your customer fulfill the criteria.

#

If I apply the duration once, in that case if they do not choose an item during checkout and sign up. next time they add the service through the dashboard they will get the 10% discount from the dashboard as well

#

I want the 10% on add-ons only if they are selected at the time of sign up, if they do not they miss the 10% and they will not receive it if they sign up through the dashboard.

median plinth
#

It's entirely up to you to implement this logic, i.e., the 2nd time your customer sign up, you shouldn't apply the coupon.

lusty latch
#

I will explain the process. When a new customer signs up, they can get the addons for 10% discount only at the time of signing up. If they choose not to add any addons and continue with the sign up they still can. Now that they have sign up, they still have the option to sign up for the addon through the user dashobard, but I do not want to offer them any discounts from the dashboard