#bugkiller.
1 messages · Page 1 of 1 (latest)
Hi there!
how are you?
If the subscription is already canceled, you can direclty check its status: https://stripe.com/docs/api/subscriptions/object?lang=node#subscription_object-status
yes.
I think you missed my question
how to check if cancelled subsccription is still in cancellation period
for example, you made subscription on Aug 15th (paid invocie for it), and cancelled on Aug 19th
this user still need to have access for our website until Sept 15th
because even if user is cancelled subscription (monthly for example), his payment is for (Aug 15 ~ Sept 15th 1 month)
I hope this makes sense
In this case you can check that the cancel_at_period_end property: https://stripe.com/docs/api/subscriptions/object?lang=node#subscription_object-cancel_at_period_end
I don't think so
document is saying like below for this property
"You can use this attribute to determine whether a subscription that has a status of active is scheduled to be canceled at the end of the current period."
How do you currently cancel the subscription?
cancel is happened due to failure
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
can you please check this ?
this subscription is canceled automatically due to charge failure
did you understand my question or not?
my question is clear. how to check if user is still in paid period or not
this subscription is canceled automatically due to charge failure
Then it's status iscancelled
yes yes
of course, status is canceled. did you read my message??
even if subscription is canceled, if you're in paid period yet, then we need to give right access.
so we need check if user is in paid period in case subscription is canceled status
?
Okay I understand now. Let me check.
thanks
You can check current_period_end https://stripe.com/docs/api/subscriptions/object?lang=node#subscription_object-current_period_end
For the subscription you shared, it's set to 2023-09-27.
current_period_end. this is what I've checked for
it
why it's subscription's current_period_end is 2023-09-27 though?
as you can see, paying each month
It's exactly one month after the current_period_start (2023-08-27)
now failed on Aug 26, then it's not in period as I think
but for current period, payment is failed. so not in paid period now
I'd like to know last paid period end time
Hi! I'm taking over from my colleague. Please, give me a moment to catch up.
ok
It's the current period start.
Yes.
and you understood my question right?
my QUESTION is how to get period end date (paid period paid paid.....)
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
check this subscription
what's the period end date?
You can list the related Invoices, each of them has a period_start/_end if it's related to a Subscription: https://stripe.com/docs/api/invoices/object#invoice_object-period_end
so you mean, no way to check last paid period end in subscription right?
I mean, in subscription object
Yes, there's a way, you list the Invoices related to the Subscription and check the periods: https://stripe.com/docs/api/invoices/list#list_invoices-subscription
ok
I don't understand why this is so hard to make you understand
maybe I'm so bad in Eng
Maybe you could give me your high-level use case, without Stripe concepts, so I could suggest a suitable solution.
is there any way to get latest n invoices by somehow expanding when I retrieve a subscription
No.