#tayz_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1217443395857809510
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, let me help you with this.
for further details, I paused a subscription for a user for a year, and then 2 weeks later, it still shows it as active
I tried reading the docs but it didn't give much information on adjusting the active / inactive
Hi Vanya, thanks
What behavior do you want to achieve exactly?
actually sorry, I should clarify
I want to know when the customer.subscription.paused would be sent, but based on my knowledge if its marked as Active still, then it will never get sent?
basically I want to monitor when a subscription gets paused after the current invoice has been paid for
so if the user paid for this month but then paused for 1 year, at the end of this month, I want to be able to mointor that
Maybe you want to just cancel the Subscription instead? You can always "resume" it by creating a new one.
hmm thats an option -- but then I'd have to set a cron job on my end right?
Why?
for the resuming creating a new one part
Wouldn't the customer request to resume it manually? Or you want to pause for a specific duration?
yes for the later, we had a frontend where the user picks how long to pause
Oh, yeah, that's one difference that you can specify pause_collection.resumes_at.
However, the name pause_collection suggests it only pauses the payment collection, and not the Subscription itself. That's why the status is still active. If you also want to pause the Subscription, it's better to cancel it and run a cron job to re-create it later.
Alternatively, you can check for the presence of pause_collection on the Subscription object as well as status: active, to determine if you should provide your services: https://docs.stripe.com/api/subscriptions/object#subscription_object-pause_collection