#daniel-subscription-status
1 messages · Page 1 of 1 (latest)
daniel-subscription-status
@haughty pebble You can call the List Subscriptions API https://stripe.com/docs/api/subscriptions/list and pass customer: 'cus_123'
Though the easiest is to store this information on your end really
is there an equivalent status field that would tell you?
like status = cancelled could still be valid in this case if they user is early in an annual subscription for example
or if a user is trialing
I'm sorry I don't follow what you are saying at all. If you actively cancel the Subscription on Stripe and still keep it active in your system, how could we (Stripe) know that?
sorry let me ask more clearly. Looking to determine if a user with a given stripe subscription (in any of the possilbe states) still has access to my product
The example statuses i can think of being trial, active, canceled.
active, trialing is obvious - the user should have access
but if a user cancels, they may still have access for the remainder of thier subscription duration
what is the best way for me to determine if a user still has "access"?
@haughty pebble I'm sorry that's still the same question with the same words unfortunately. If a user cancels and you cancel the Subscription in Stripe then from our side they do not have access anymore. If you keep their access on your end that's something you would fully control with your own code and data
Usually if you keep someone's access you do not fully cancel the Subscription. You use cancel_at_period_end instead
oh i see, maybe im cancelling wrong then
const res = await this.stripe.subscriptions.cancel(user.stripe.subscriptionId, {
prorate: false,
cancellation_details: {
comment: comment,
},
})
im calling this to cancel
is there a different way i should do it for the user to maintain access throughout the end of the subscription
ok i see, and then the subscription stays active until the end of the cycle