#andrea-skuola-subscription-status
1 messages · Page 1 of 1 (latest)
Hi 👋 can you elaborate a bit on your first question?
For the second, are you saying you're intending to use a subscription to build an installment payment structure and that you plan to cancel it once the installment payments have been made?
I have a page on my site where customers can view their transactions, included subscriptions.
If a user has a subscription, in the details I print for example "installment 1/3" to make they understand that remains 2 installments.
I set by default on subscription creation the cancel_at field at +3 month from today date for let customer pay 3 times because the payment interval is monthly.
When the expiration date arrives what is the status of the subscription?
Because now i'm getting subscription like this: $subscriptions = $stripe->subscriptions->all(['customer' => $userStripeId, 'status' => 'active']); but i think that after the expiration date subscription is no longer active
If you're leveraging cancel_at then the subscription will move to a canceled status at the specified time.
this is the only case in which a subscription is set to canceled?
because I need to know if i can rely on this status
No, a subscription moves into a canceled state whenever it is canceled, and this can be done in ways other than by leveraging cancel_at. canceled is the primary terminal state for Subscription objects.
If you use the endpoint that cancels a subscription:
https://stripe.com/docs/api/subscriptions/cancel
If you integrate the customer portal and allow your customers to leverage it to cancel their subscriptions (if you're using subscriptions for installment payments, I would strongly discourage the user of this).
https://stripe.com/docs/billing/subscriptions/integrating-customer-portal
Failed payments may cancel a subscription depending on the configurations you have for subscription settings:
https://dashboard.stripe.com/settings/billing/automatic