#dominikganic_best-practices
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/1349091321289117818
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- dominikganic_unexpected, 23 hours ago, 13 messages
I have this code in my backend to Pay():
'off_session' => false,
'expand' => ['payment_intent.payment_method']
]);```
Error creating Payment Intent for invoice: This invoice can no longer be paid. Consider voiding, marking as uncollectible, or marking as paid out of band instead.
That's the error I get when paying it. :/ But it's still "open". The status of the payment intent in my stripe dashboard is "canceled".
Hello
Can you share the subscription as well as invoice ID you're working with?
Hi, yes sure, sec
Invoice ID: in_1R1WrKLZihhBkt1cXWNeBVWw
Subscription ID: sub_1R1OVVLZihhBkt1czf93LP2N
The subscription is set to "past_due"
The latest invoice is status "open" but in my stripe dashboard I see "failed" (red) - thats confusing
tl;dr; my question is: What should I do now at best to pay this subscription invoice? ๐
Hmm have you tried paying the invoice via the payment page?
I'm still seeing invoice as open
If that doesn't work, try moving the test clock a day forward and see if the invoice gets updated
That's what I see with red (failed in english)
It tells me "The attempt to charge the customer's stored payment method has failed once. No further retry attempts are scheduled. Please check your retry settings."
I will move forward the test clock now ๐
Invoice is already 9 days old and nothing has happened yet.
Whenever I try to pay it via API (invoices->pay) I receive:
"This invoice can no longer be paid. Consider voiding, marking as uncollectible, or marking as paid out of band instead."
Can you share the API request ID?
https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Yup, thanks.. Looking
Should I mark this invoice as "void" or whatever matches here and create a new invoice - bound to the subscription (if possible) - and let the user pay it?
I had at least 10 attempts paying it when it suddenly "canceled" the invoice's paymentintent
Yeah I believe that's the issue here. A PaymentIntent can only be attempted upto 10 times. After that point it is cancelled automatically. Cancelled PaymentIntent causes the invoice to get stuck in this weird state.
Ah yes. That's what I want to hear xD
Makes sense then. But how should I proceed? The customer should be able to pay the invoice and keep his subscription alive active ๐
I don't exactly know what happens to the subscription in this case since subscription status is determined by the latest invoice state.
You could mark the current invoice as void or paid out of band &
then create a one-off invoice using create Invoice API endpoint - https://docs.stripe.com/api/invoices/create#create_invoice-subscription
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yeah, I've setup a behavior in the Stripe Dashboard, once a subscription is in the state of "past_due" it will convert in 7 days to "unpaid" and then within 14 days to "canceled".
That's why I'd like to proceed here ๐ Thanks for your solution, I will implement it that way and I think, when I manually void the invoice and create a new one, it should work!
Thanks ๐ Have a nice day.