#mterrel_unexpected
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/1304172660892241952
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Some objects in case you can look at them:
- Subscription: https://dashboard.stripe.com/subscriptions/sub_1QGRvGKofQrplVmDpsDDR6qx
- Invoice 1 (now paid): https://dashboard.stripe.com/invoices/in_1QGRvGKofQrplVmD2977cl2u
- Invoice 2 (for pending update, now voided): https://dashboard.stripe.com/invoices/in_1QGS0WKofQrplVmDXEU3AP5w
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Hi there ๐ taking a closer look
Thanks! Let me know if you have questions. I'm happy to provide more specifics.
Thanks for the context, i think I have a good sense of what is going on. I fear this is a rough edge with the flow, where the latest_invoice is voided and so you're not able to pay it to get the Subscription back into an active state, but I'm going to double check with my teammates on that.
That's what I suspected.
So is there a way to get the subscription back out of unpaid?
Still checking with my teammates to see if they can think of a cleaner way to do it. But what is coming to mind is generating a $0 Invoice for the Subscription, to be the latest_invoice.
I'm taking a closer look though, because I see the Sub was active after the creation request:
https://dashboard.stripe.com/logs/req_Vyhm38uSXD6dAq
so I think we're misaligned on what Invoice 1 means.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Yeah, I'm a little unclear what's going on there too. The subscription seems to have become active immediately, rather than waiting to charge the first invoice.
I don't think the first invoice got attempted until AFTER invoice 2 was voided.
But I'll admit I didn't study those events as closely
Yup, it threw me for a loop at first since the default_payment_method is a card, but it's because it's an IN-based card which are more complex.
IN-based customers seem to trigger the most bugs in our Stripe integration too. They really find where we didn't correctly test payment failure paths. :/
Heh ๐
they have like a 23-24 hour window during which they're sent a pre-debit notification, and if they don't accept it the payment fails asynchronously. For asynchronous payments the Subscription immediately goes into an active state, and then may change if that first payment turns out to fail.
Ahhhh...I didn't see that in the docs
That's understandable, it's split out in this doc:
https://docs.stripe.com/india-recurring-payments
To prevent this situation, I'd suggest adding logic to block updating Subscriptions until the first Invoice is paid successfully.
If you can replicate this in testmode, I'd suggest trying to create a $0 Invoice for the Subscription to make sure that brings it back to an active state. Or if you can handle Subscriptions in a trialing state, you can add a trial period that lasts until the next billing period.
Ugh. That sucks to have to do because of how we try to keep our own concept of subscription in sync with Stripe's status. But yes, that does sound like what we need to do just because otherwise, it's a great way to scam us and get free service without ever making a payment. (We have to deal with unsavory folks like that a lot.)
So is the "auto active" unique to a freshly created subscription? I'm assuming we can still rely on the standard pending update behavior where the pending update doesn't progress to "active" (applied to the subscription) until the invoice is paid, right?
I'm pretty sure that's correct.
Can I create the $0 invoice via the dashboard? I tried going from the subscription page specifically, then clicked Actions > Create one-time invoice. But that doesn't seem to set invoice.subscription. Do I have to do something specific to get that attachment to the subscription? Or do I have to do that via API?
I'm not as familiar with how to do that from the dashboard, let me poke around a bit.
Thanks!
Huh, it definitely doesn't feel intuitive that creating a one-tine Invoice from the Subscription page doesn't tie the Invoice to that Subscription (at least to me), but that's what I'm seeing as well. So i think you're going to have to use the API for that.
Or the CLI/Shell
Ok, no problem. Thanks for the confirmation.
I think that's all the questions I have for the moment. Thanks a lot for your help. Y'all are always a pleasure to work with.
Any time! I'll keep the thread open for a bit in case anything goes wonky while you test out my suggestions, since we're pretty deep into edge-case territory here.
Thanks, I appreciate that.
Quick heads up that I'll be closing this thread out shortly as my teammate gets ready to take over the server. If there is anything else that comes up you are welcome to create a new thread with a brief summary of where you're at and they'll be happy to help.
No worries. Thanks again for all the help!