#john_webhooks
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/1359382894614937660
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
- you're awesome for responding for 2 minutes, why is this a free service
Hi! My understanding is that:
- you listen to the invoice.created event for a renewal
- you run a balance check on the subscriber
- if the subscriber doesn't have sufficient funds, you update the subscription's billing cycle anchor.
Have you been able to do this before or are you checking if it's possible?
By curr cycle do you mean current cycle?
correct
im asking if there is any amount of risk given the race condition / is there something more common done by devs when doing stuff like this that you have seen
it seems slight sketchy because of the automatic collection
we have thousands of yearly subscriptions and waiting a year for the change to go through is not an option unfortunately
Give me a moment to look at this.
I had a follow up question. What is the purpose of updating the billing cycle anchor if the customer doesn't have sufficient funds?
preventing failures
By failed do you mean it gets cancelled? Because there are other options on what should happen to the subscription if all retries for a payment fail. You can go to the Billing Dashboard settings: https://dashboard.stripe.com/settings/billing/automatic and scroll down to Manage failed payments for subscriptions.
Additionally, you can't change the billing cycle anchor to a later date. You can only pass now or unchanged: https://docs.stripe.com/api/subscriptions/update#update_subscription-billing_cycle_anchor
Can I configure the retries to happen only for renewals?