#jasonfish568

1 messages · Page 1 of 1 (latest)

sharp trenchBOT
high sluice
#

Hi, can you elaborate what it has vs. what do you expect?

sick sentinel
#

It returned a timestamp 1696047389 which is the time I made the payment. However, shouldn't it return a timestamp 1 month later? As this is a monthly subscription?

high sluice
#

Ah I know this. So as a rule on our end, the invoice is always for the "previous" period, means that if you have a monthly subscription on the 1st of the month, the invoice on the 1st of November will be for the 1st of October until the 1st of November

However, there is an exception which is for the first invoice. Since there is no "past" for the invoice, period_start and period_end will be equal in that situation and correspond to the date the subscription was created

sick sentinel
#

Sorry, but I'm receiving a customer.subscription.updated event, object should be a subscription?

high sluice
#

Yes, that current_period_end will reflect the its latest Invoice's period

sick sentinel
#

Then how do I get the new period end time?

high sluice
#

It's, by design, same as when you created the Subscription. On the next billing cycle, you will see the new value

sick sentinel
#

What I was told yesterday is different to what you said just now. The other support asked to use the current_period_end as the new end date.

#

So when I use checkout and paid the invoice, how do I know the end time for my first billing cycle?

high sluice
#

Can you link to that discussion? I want to grasp the whole context

sick sentinel
#

one sec

high sluice
#

Could be misunderstanding. But let me test out a bit

sick sentinel
#

Yup. There must be a way for me to get the end of the billing cycle for a subscription when creating a new one and for renewing an existing one

high sluice
#

Hey wait

#

It returned a timestamp 1696047389 which is the time I made the payment
1696047389 is Sep 30, while this Subscription is created on Aug 30, which is expected

#

So it's exactly 1 month after you made the payment

sick sentinel
#

Oh damn. Sorry, my bad, I looked to the wrong row on the converter

#

SO sorry

high sluice
#

Me too, overthinking of Invoice instead. Hope you are clear now 🙂