#renraj.
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. 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.
- renraj., 1 day ago, 25 messages
What do you mean by:
But when I convert to Invoice the date is different. why is it so?
Which webhook event(s)?
we are devloping in C# code. we setup one webhoot while invoice paid. In the webhook trigger I got the end and start date as given.
If I check the date conversion I will get
1709627815 -- March 5
But in backend code, when I convert the webhook trigger to Invoice object , I get the end period as
why Peroid.End in webhook is changing to Feb 5 in Invoice object ?
Can you share the evt_xxx ID?
what is it?
The ID of the webhook Event object those fields are from
evt_1OV8zpEFMLOkx7yAAZOxaasF
That's because the period dates on the invoice are for the previous period (Jan - Feb), where as the periods on the subscription/items are for the new period (Feb - Mar)
how to get Feb-Mar date then?
From the invoice.paid event? You'd look at the period hash on the line items: https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-period
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
what I did was... I created one subscription today... Its renewal is on Feb5. Then I advanced the clock and I got that webhook trigger for "Invoice.Paid"
so that invoice is from Jan-Feb?
No, that invoice is for the period from Feb - March. However the period_start and period_end field on the Invoice object reflect the timestamps from the previous period (Jan - Feb)
That's just how our invoices work
so I need to take the date from Lines object to reflect our internal DB fields, if renewal paid successfully, rite ?
Yes!
np!