#sabsod
1 messages ยท Page 1 of 1 (latest)
๐ happy to help
you can check the subscription's status https://stripe.com/docs/api/subscriptions/object#subscription_object-status
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
yes correct
i have test it, but i see that status of subscription is still active
i tried to suspend payment collection, and we can read it on right of status
but how i can i know that payment collecting is suspended so can i suspend service to customer?
?
I'm sorry for the late reply I will be with you shortly
Hi there ๐ apologies for the delay. I'm jumping in to lend a hand, please bear with me a moment while I catch up on the context here.
Could you please share the subscriptionId ?
In order to suspend service to your customer you just listen to this event invoice.paid in order to track active subscription:
https://stripe.com/docs/billing/subscriptions/webhooks#active-subscriptions
In your database you set an expiration date for the service, if you receive an event you extend that date otherwise you suspend
@gritty dirge did you see the replies here?
yes thanks
from here start my question with example
what's the question exactly? Can you also share the ID of the subscription sub_xxx?
sub_1LxS4PDKN3agnIe0mWTK6UG6
i suspended payment collecting on this subscribe
so i want suspend subscription also in my system
how i can know that payment collecting was suspended when webhook of customer.subscription.updated arrive?
what are you referring to exactly there? how did you do that?
ah ok you paused collection
then https://stripe.com/docs/api/subscriptions/object#subscription_object-pause_collection is the field that you look at which tells you that the collection was paused. You can see now it has the value void for that Subscription object.
now is suspended that's why on button now there is resume
but before there is suspend
yes