#t0ddo
1 messages · Page 1 of 1 (latest)
Hi 👋 you'll need to make a request to update the Subscription to make that change. Are you processing the payment retries yourself, or are you letting automatic retries handle that for you? (It changes how I would recommend triggering that update)
Payment retries are handled automatically by Stripe
It is a custom policy though
Actually scratch that
We have it setup via Churnkey
So I assume they handle it for us but not via Stripe's own handling for that
Gotcha, as far as I know there isn't a way to have that flow automatically adjust the billing cycle anchor after a retry succeeds. Instead the approach that comes to mind is to use a webhook endpoint to listen for Events that would trigger when one of those payments succeeds, like invoice.payment_succeeded. Then in the code running in your webhook endpoint, have it check that Event is specifically for a Subscription renewal retry, and if so make a request to set billing_cycle_anchor on the Subscription to now:
https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_cycle_anchor
I'd recommend using test clocks to test the flow and make sure you find the proration_behavior that matches the behavior you want for your flow.
https://stripe.com/docs/billing/testing/test-clocks
Gotcha, I'm less familiar with how Churnkey does it, but I suspect the same approach might work.
Yep, it should, thank you.
Any time!