#idealfull_docs
1 messages · Page 1 of 1 (latest)
👋 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/1435477964551622719
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
⛔️ Stripe developers have stepped away for a short while
Please leave your questions here, and we’ll respond as soon as we're back! If you need help urgently, you can contact Stripe support for help.
Hi! Looking into your question!
Can I have the object ID of the subscription you created? It starts with sub_
this one sub_1SN2dSPPjTFS9ll0CnmtrEGZ
Actually, I just want to confirm whether my coupon will automatically stop after 2 months when using Duration=repeating along with DurationInMonths=2, and then revert to the original price.
Looking into that now.
Maybe like this:
To give you a pointer though, DurationInMonths configures how many months the Discount that will be created when that Coupon is redeemed will be valid for. If you have a Subscription with a billing period every day then this Discount would be valid for the first two full months of that Subscription and every single Invoice for the first 2 months will be discounted.
Can I check why are you using duration: repeating and duration_in_months: 2 because these are deprecated parameters?
For example, if a subscription originally costs $10, I want to use a coupon to make the first two periods $8 each, allowing the subscriber to enjoy some discounts at the beginning.
Like this Note in SDK codes:
// Specifies how long the discount will be in effect if used on a subscription. Defaults to once.
Duration *string form:"duration"
// Required only if duration is repeating, in which case it must be a positive integer that specifies the number of months the discount will be in effect.
DurationInMonths *int64 form:"duration_in_months"
I would recommend not using these 2 parameters as they are deprecated:
- https://docs.stripe.com/api/coupons/create#create_coupon-duration:
This value is deprecated and will be replaced in future versions of the API. - https://docs.stripe.com/api/coupons/create#create_coupon-duration_in_months:
Deprecated
Can I confirm what you wish to achieve is:
- Monthly subscription
- Apply a discount for the first 2 months?
YES,but maybe three months also
Looking into this for you. Give me a moment.
I would suggest looking at Subscription schedule instead. You can have phases for the number of months you wish to provide the discount for. And you can create a coupon with a non-deprecated parameter: duration: once
https://docs.stripe.com/billing/subscriptions/subscription-schedules#upgrade-downgrade-coupons