#nicolaswemin_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/1222531470464385097
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Can you share the invoice ID?
What's the status of the invoice after 3 attempts?
@fringe iron Hello ๐
Absolutely, here it is: in_1OyvHNCkc1cy5pgJpTl1jZ8P
It's status=open, weirdly enough
Here's a snipper to repro
It looks like the underlying payment intent was cancelled
try {
const result = await stripe.invoices.pay('in_1OyvHNCkc1cy5pgJpTl1jZ8P')
console.log(result)
} catch (err) {
console.log(err)
}
Yes, I'm simulating the customer attaching different payment methods and failing those
Until he finds a card that works
The PaymentIntent has a set number of confirmation attempts that you can make for security reasons
aham...
I believe the one associated with the invoice exhausted that limit
Hence, the PaymentIntent was cancelled
Is there any way to restart it in a way?
I mean, what happens to the Subscription that this Invoice is for? How can I collect payment and get the Subscription set back to activeagain
Subscription is still in past_due status, yeah? You can consider voiding, marking as uncollectible, or marking as paid out of band
Subscription status is associated with the most recent invoice afaik
but that doesn't collect payment
There's no way to collect the payment for that specific invoice on Stripe given it exhausted the confirmation limit.
oh wow, that's interesting
Let me check something really quick though
so the customer pretty much locked himself out of the subscription?
If he can't pay that invoice, then his subscription is stuck at past_due
voiding it or collecting out of band isn't an option since the customer needs to actually pay us ๐
of course, take your time!
What happens if you call /pay endpoint and try to pay the invoice? OR could you try paying the invoice from the dashboard?
Ah yup just saw the error
try {
const result = await stripe.invoices.pay('in_1OyvHNCkc1cy5pgJpTl1jZ8P')
console.log(result)
} catch (err) {
console.log(err)
}
So I checked with a colleague about this.. Unfortunately, this specific invoice can't be paid.
What you can do instead is create a separate PaymentIntent for one-time payment, collect new PaymentMethod from the customer and accept payment that way. Once you do that, you can mark the invoice paid out of band.
You can also set the collected payment method as customer's default
NP! We'll make sure to flag this to our product team as there has to be a better way to handle this usecase
Thank you hanzo, sounds about right