#mochihealth_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. Thank you for your patience!
âąď¸ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime! If this thread is closed and you have another question you'll need to start a new thread.
đ 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/1214708020731322449
đ Have more to share? You can add more detail below, including code, screenshots, videos, etc.
Taking a look!
I see the invoice was voided manually, not as part of smart retry settings
ok but if an invoice is voided shouldn't the subscription be automatically cancelled
also the stripe logs for that customer show no manual voiding of invoices (assuming by manual you mean an api call)
If you scroll to the "logs" section here, you'll see the API call to /void: https://dashboard.stripe.com/invoices/in_1OqgmBBPM36OC3gXwzLd9HVF
but doesn't voiding of an invoice automatically cancel the subscription?
why does it say attempt
usually it just cancels right after
did something change
I'm pretty sure that I have that if a payment fails it should automatically cancel the subscription in my settings
like I can give you an example of another case of failed payment and voided invoice where the subscription was canceled
sub_1OK4coBPM36OC3gX8j0f0qC8
here the same exact thing happend and the subscripption canceled
Looking
I see that the second one shows payment failed in the logs and the first one just goes straight to void but I'm not sure why
I also see this request req_OdRiFM4Rk6j8O6 and I'm not sure what this is
So for sub_1OK4coBPM36OC3gX8j0f0qC8 , voiding the invoice manually is not what triggered the Subscription cancellation
ok so what triggered the subscription cancellation
how come for sub_1Mi0KhBPM36OC3gXPowBBjFh it never says that payment was attempted and goes straight to being voided
If you're viewing Invoice in_1OqgmBBPM36OC3gXwzLd9HVF in the Dashboard, you can scroll and click on "Payments" to see the underlying PaymentIntent. There's a failed payment there
so then why wasn't the subscription canceled
ok
yea I need like a comprehensive understanding of what causes something to cancel a subscription and what does not
Okay, I would have expected to see both the invoice for sub_1Mi0KhBPM36OC3gXPowBBjFh be marked as uncollectible and the Subscription itself to be canceled after that first failed payment attempt. This is what happened with sub_1OK4coBPM36OC3gX8j0f0qC8 since your subscription dunning settings allow for a single failed payment before we cancel the subscription.
So, to clarify, sub_1OK4coBPM36OC3gX8j0f0qC8 wasn't canceled because of the call to void the invoice. Instead, it was canceled because of a failed invoice payment
The settings I'm referring to are here: https://dashboard.stripe.com/settings/billing/automatic
Under "Manage failed payments for subscriptions"
I'm still digging to see why sub_1Mi0KhBPM36OC3gXPowBBjFh wasn't canceled
ok thanks yea that seems like a bug on stripes end?
I'm trying to figure out what happened after that failed invoice payment by digging through some logs
I also have a questions around weird behavior with resetting the billing cycle and the payment failing. the subscription does not cancel which makes sense but the billing cycle date is being reset even though the payment failed. I have instances where it doesn't reset which I believe is the expected behavior and instances where it does
Can you share a couple of examples?
sub_1OhfrsBPM36OC3gXS3rpW2NU seems to work as expected and the billing cycle does not reset and sub_1NW32vBPM36OC3gXYe600EEW seems to be acting very strangely
sub_1OKkrRBPM36OC3gXi9pY3rTa does the same thing
Okay, I'll need to loop in our engineering team to dig into why this Subscription wasn't automatically canceled and why the latest Invoice was not automatically marked as uncollectible. Could you write into our support team so we can keep you updated on our investigation? When you write in, please include the Subscription IDs we discussed (sub_1OK4coBPM36OC3gX8j0f0qC8 and sub_1Mi0KhBPM36OC3gXPowBBjFh) and mention that you were working with me in Discord: https://support.stripe.com/contact/
do you have any insight into the second question that I had
For the second question, let's be super clear:
sub_1OhfrsBPM36OC3gXS3rpW2NU - Are you referring to this update? https://dashboard.stripe.com/logs/req_Medqb2ezJR7y74
sub_1NW32vBPM36OC3gXYe600EEW - Are you referring to this update? https://dashboard.stripe.com/logs/req_z97aHZPw58VSdf
yea
sorry it looks like those are referring to the same subscription
sorry yea those are different and both of them should have canceled and not had the billing cycle reset when the payment failed
technically those subscriptions should be expiring in like 3 days
Sorry, I'm a little confused. Both of these requests were made to update metadata and billing cycle anchor on two different subscriptions:
https://dashboard.stripe.com/logs/req_Medqb2ezJR7y74
https://dashboard.stripe.com/logs/req_z97aHZPw58VSdf
What exactly is not working as expected?
the subscription was created on feb 8th which means the renewal should be on march 8th the billing cycle update failed on march 5th and now it says the the next billing date is april 8th when it should be march 8th
Sorry, I still don't follow. Let's focus on one subscription, sub_1NW32vBPM36OC3gXYe600EEW. Can you detail what exactly is not working as expected?
shouldn't the billing date only renew if the charge works
which charge/invoice are you referring to for sub_1NW32vBPM36OC3gXYe600EEW when you say if the charge works?
in_1Oqz20BPM36OC3gXAP7ssvp8
that Invoice was created due to a request to update the Subscription. Are you saying that you expected the Subscription to not update if the payment fails?
I would expect that the new date that a subscription becomes due on should not update if the payment fails
If you want a Subscription to only update if payment is successful, you can look into using using pending updates : https://docs.stripe.com/billing/subscriptions/pending-updates. Pending updates only support certain subscription parameters though, so you would want to make sure that all the parameters you want / intend to use are supported : https://docs.stripe.com/billing/subscriptions/pending-updates-reference
If a parameter you want to use is not supported by pending updates, the only option is to do the rollback yourself to the subscription's previous params if the payment fails
I think I use this for another case but I suppose I can try this as well for this scenario. I remember there is like a gotcha for payments that are ach. can you refresh my memory or do you have no idea what I'm talking about