#donut_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/1436324584788987955
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
yeah i know but when its parsed by the library im getting the same date
what are you expecting the values to be?
what's the invoice ID
PeriodEnd and PeriodStart are being parsed as the same date but stripe is sending them as they should be
in_1SQo8CAehciZ0TVeSoM96Dse
the dates are wrong yes
they should be 11/7/2025 9:47:04
interesting
which SDK version are you using?
would you mind upgrading the 49.2.0
and double checking if the error is still happening?
okay
yeah it's still happening
same period end and same period start
they are supossed to be 1 month apart
what's the invoice ID now?
in_1SQm6NAehciZ0TVetRccqmXT
but it is correct
the periodstart and periodend for this invoice are correct
let me correct my statement
the problem isn't in the SDK
I'm investigating now why the generated event has the invoice period start and end wrong
so it is supposed to represent that right?
im in sandbox testing env just so you knoe
the problem isn't coming from the SDK, the periodEnd shouldn't be equal to the periodStart
okay
I'm just trying to see if I could replicate this
okay
Hi there ๐ apologies for the delay. I'm jumping in to lend a hand, please bear with me a moment while I catch up on the context here.
Ok so to summarize this:
invoice: in_1SQo8CAehciZ0TVeSoM96Dse interval starts at 2025-11-07 11:47:04 UTC and ends at 2026-11-07 11:47:04 UTC
However the invoice.paid event's period_start and period_end are exactly the same value 2025-11-07 11:47:04 UTC
Ok I think you should instead use lines.data[0].period.end|start you should get the correct value you are looking for
We introduced this breaking change where the root level period is removed from the Subscription and updated to the line items level:
https://docs.stripe.com/changelog/basil/2025-03-31/deprecate-subscription-current-period-start-and-end