#fedeb_api
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/1355174966508781790
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, what does ' duplicate redeem' mean here? What did you expect vs. what you're seeing exactly and where? We discuss a bit more about prorations and discounts here: https://docs.stripe.com/billing/subscriptions/prorations#prorations-and-discounts that might be helpful to review
the cupón code is for "10% off once" but when using the clock feature to advance time in test mode.
two invoices got the discount of 10% .
if you check the logs
the create scheduled it automatically creates two phases , each one has a discount object
https://dashboard.stripe.com/test/logs/req_DvwAOYHy0GFojL
then I update the phases by adding a new phase in the middle of the original last phase end_date .
I maintaining the same discount object.
I add this new phase because I want to upgrade the subs to a new plan in a X time in the future (1744293600)
https://dashboard.stripe.com/test/logs/req_gef5yPPNwBr5sD
You can limit how to apply the coupon on the product: https://docs.stripe.com/billing/subscriptions/coupons
However, on the subscription schedules update, https://dashboard.stripe.com/test/logs/req_gef5yPPNwBr5sD you're passing the discount on each phase. If you did not intend to do that, you'd need to remove the discount from the next phase.
Are you able to test that?
the problem is if I remove the discount it will be removed.
I tested with other subs. that had 50% off for 3 months
create scheduled , response has two phases with each one discount object
https://dashboard.stripe.com/test/logs/req_6Y15mv83SlPYA3
I added a new phase without the discount object, (but the other two still have discount object to maintaining the same original data)
https://dashboard.stripe.com/test/logs/req_yZRQGFWuIy8pOl
and the effect was that only 1 invoice had 50% the other were full price when using Clock feature.
Which invoices did you expect the dicount to appply exactly?
this was applied https://dashboard.stripe.com/test/invoices/in_1R6wHcE8gsL5R1XuJph1AqqZ
and this two that should be applied it did't
https://dashboard.stripe.com/test/invoices/in_1R6wJVE8gsL5R1Xujl3wVbY6
https://dashboard.stripe.com/test/invoices/in_1R6wJFE8gsL5R1Xu2qaARbcc
I notice now that the original discount was applied to old SKU. the first invoice in_1R6wHcE8gsL5R1XuJph1AqqZ
but the other two invoices in_1R6wJVE8gsL5R1Xujl3wVbY6 in_1R6wJFE8gsL5R1Xu2qaARbcc
has the new sku, that Im not adding "discount" object in the phase. so that could be the reason?
since they are different sku, is not passing the % month to the next two since its a differet sku of when the coupon was applied?
If you want the discount to be applied to a specific phase, you'd need to pass the discount on that specific phase: https://docs.stripe.com/api/subscription_schedules/update#update_subscription_schedule-phases-coupon
but why, I dont understand.
If I add the coupon to the new phase that has new sku, it will applied to 3 months future invoices.
making in total 4 invoices with discount
You could specify the iteration for 3 months: https://docs.stripe.com/api/subscription_schedules/update#update_subscription_schedule-phases-iterations
I'm unsure what you mean by '3 months future invoices.
making in total 4 invoices with discount'
I was under the impression that you'd want the discount to apply for 3 months.
because the first one was applied in_1R6wHcE8gsL5R1XuJph1AqqZ
then the new phase that makes the upgrade plan to new price take effect
if in that phase I send the discount code, it will interpret as a new coupon applied so it will start again from zero.
making the next 3 invocies to 50%
so in total 4
I see. I highly recommend that you test with iterations here and see if that what you're looking for.
okay I will go and test more thanks.
that is all