#jasonfish568
1 messages · Page 1 of 1 (latest)
Hi, can you elaborate what it has vs. what do you expect?
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?
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
Sorry, but I'm receiving a customer.subscription.updated event, object should be a subscription?
Yes, that current_period_end will reflect the its latest Invoice's period
Then how do I get the new period end time?
It's, by design, same as when you created the Subscription. On the next billing cycle, you will see the new value
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?
Can you link to that discussion? I want to grasp the whole context
Could be misunderstanding. But let me test out a bit
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
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
Me too, overthinking of Invoice instead. Hope you are clear now 🙂