#polar18_webhooks
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/1226882627118698606
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi there ๐ you're correct. That approach does not, nor is expected to, update the Invoice that was already generated by the Subscription switching to it's new billing period.
You would need to make that change prior to the Invoice being generated.
Hi, thanks for the confirmation. Do you mind saying more on how we could make that change prior to the invoice being generated? Is there another webhook event we can handle that would allow us to pre-emptively make that change, or would we need to schedule this change ahead of time using https://docs.stripe.com/api/subscription_schedules/object?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Subscription Schedules is what I was going to grab you the link for.
You may also be able to use invoice.upcoming Events, but those are received days before the Invoice is generated.
Got it, thanks for the pointer on invoice.upcoming events - I'll look into that
Sorry, one additional question on this: I initially started looking at this approach from https://docs.stripe.com/billing/invoices/subscription#update-first-invoice, based on:
For customers that receive invoices, you have a one hour period after creation before Stripe finalizes the subscription. Within this timeframe you can make necessary changes to the subscription, like changing amount or line items, adding a description or metadata, and so on.
This makes it sound like I should be able to update the subscription and invoice off the recurring invoice event, am I incorrect in my understanding there?
You can update the Invoice, but updating the Subscription won't update the already generated Invoice.
Got it, that makes sense - thanks!