#afonsolfm
1 messages · Page 1 of 1 (latest)
I am looking at latest_invoice.period_end is that what I want?
Well I have a SaaS, and I want to make sure user can only use the product if he has paid full amount until that point
Ah
I want to extract a date from the subscription
Really you just want to look at the status of the Subscription
Yes, it's past_due
If it is active then the Subscription has been paid
Yeah, isnt there a date I can refer to though?
Otherwise, it is not currently paid and you should not provision access
You can look at the last paid Invoice and the period_end on that Invoice if you want. Or the first unpaid Invoice and the period_start
is that always accurate though?
Otherwise yeah you can look at the Subscription's current_period_start
in which scenarios does that break?
That all depends on your integration and what you are doing
The easiest thing to do here is to track the Subscription. So when it moves to past_due you look at current_period_start
That is the timestamp at which it no longer was paid (active)
Ok thanks, I've just withdrawn access if it's not active.
👍