#noah_best-practices

1 messages ¡ Page 1 of 1 (latest)

light zincBOT
#

👋 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/1417928248699916460

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

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

odd flax
#

Hi, can you share a concerete example with me here?

upper hill
#

At the end of the billing cycle, a 3 month discount falls off. We have reached an agreement with a customer to extend their discount another 3 months. When it falls off, we want to make sure it is reapplied immediately and appears on the upcoming invoice.

odd flax
#

Is that not working?

upper hill
#

The issue is we're not receiving the invoice created webhook and the coupon deleted webhook in consistent order. So when we receive the deleted event after the invoice has already been created, the changes to the subscription aren't propagated to the draft invoice.

odd flax
#

Can you share the subscription update request you made, or the subscription id so I can look?

upper hill
#

sub_0S7zJ63MFIk84T3nQfDF2UOF

#

This was discussed in the thread linked above from yesterday

odd flax
#

There is that invoice created event: evt_0S7zJq3MFIk84T3nJs6soes8 sent at 2025-09-16 13:53:15 UTC.

What did you expect to happen exactly? Can you share the specific requests you made and the expected behavior? What is not 'propagated' exactly?

upper hill
#

We expected that when the subscription item has the discount reapplied with an invoice in draft mode, the discount application is propagated to the invoice

odd flax
#

You expect the changes from this request to update the subscription, https://dashboard.stripe.com/test/logs/req_6LAr1C8KfvNZ0H at 2025-09-16 13:54:10 UTC to be reflect on the latest invoice as the finalized event, evt_0S7zM83MFIk84T3njyP7cf2S for that invoice happened at 2025-09-16 13:55:37 a few second before it was finalized?

#

If so, updates to a subscription will not modify already-created invoices, even draft ones

#

The upcoming invoice shoudl reflect that invoice.

#

You need to ensure that you make the subscription update before the invoice is created.

light zincBOT
upper hill
#

What webhook event can we listen to ensure that we're able to re-apply this discount without any weird interplay with the existing one?

#

invoice.upcoming?

merry adder
#

Yep, that would be a good one to listen to here

upper hill
#

And can we ensure if we receive that before the coupon.deleted webhook of the original discount, and apply it, effectively stacking it, only the single discount will appear on the upcoming invoice?