#bugkiller.-invoice-period

1 messages · Page 1 of 1 (latest)

unique violetBOT
upper orchid
#

anyone to help?

#

Apologies, server is very busy but we're getting to things as fast as we can

#

Can you tell me more about what date is wrong on these events for you?

plush lake
#

Hi, Can you please check this invoice?

#

in_1OI0xwBTGnRwDyDi0chotLDU

upper orchid
#

Sure, and what timestamp on it is wrong?

plush lake
#

user paid this invoice so its billing period is 2023 ~ 2024

#

but this period start, period end is

#

2022 to 2023

upper orchid
#

That period timestamp is actually something else

#

It refers to the time when the invoice items were added

#

I think there are different timestamps for the period that you are looking for but am not finding them at the moment

#

If you look at the period hash on the invoice line items, they may have the period that you are looking for:

              "end": 1732937384,
              "start": 1701314984
            },```
plush lake
#

I also thought like that.

#

so if I got invoice.paid,

#

then in line items, will get first one?

#

lines / data : this is list of object

#

so I have to pick first one right? that will be latest

upper orchid
#

It is possible for one-time invoice items to get intermixed with the subscription ones

#

So you can iterate through the list and use the period from the first item that is from a subscription

plush lake
#

this is invoice for subscription

#

anyway, let me do that way

unique violetBOT