#renraj.

1 messages · Page 1 of 1 (latest)

copper thicketBOT
#

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.

keen birch
#

What do you mean by:

But when I convert to Invoice the date is different. why is it so?

#

Which webhook event(s)?

timber harbor
#

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 ?

keen birch
#

Can you share the evt_xxx ID?

timber harbor
#

what is it?

keen birch
#

The ID of the webhook Event object those fields are from

timber harbor
#

evt_1OV8zpEFMLOkx7yAAZOxaasF

keen birch
#

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)

timber harbor
#

how to get Feb-Mar date then?

keen birch
timber harbor
#

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?

keen birch
#

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

timber harbor
#

so I need to take the date from Lines object to reflect our internal DB fields, if renewal paid successfully, rite ?

keen birch
#

Yes!

timber harbor
#

thank you..I will work on it

#

thnx for ur time

keen birch
#

np!