#sai_rez-subscriptions
1 messages · Page 1 of 1 (latest)
what's the error?
https://support.stripe.com/questions/finding-the-id-for-an-api-request#:~:text=Navigate to Developers >> Logs.,the dashboard URL as well.
Find help and support for Stripe. Our support center 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.
For cancelled sub
req_IvkHZRy6Y6Wh4C
for invoice marked as uncollectible
req_5J680BebOlZtaj
customer ID
cus_JU7pW5XkwJQQQp
(Working on test mode fyi)
req_IvkHZRy6Y6Wh4C
it's already cancelled(as a result of voiding the invoice previously), so you can't cancel it again
req_5J680BebOlZtaj
the error seems self-explanatory. The invoice was already uncollectible at the time you make that request, you can't mark it uncollectible again
A bit of context, the customer had multiple draft invoices and a failed invoice with a status of open.
I retrieved all the invoices and iterated through them to finalise and void the draft invoices and mark the failed invoice as uncollectable. And finally, cancel the subscription.
- Does marking the invoices as void cancel the subscription automatically?
2)There was only one failed/open invoice, could something else have marked it as uncollectable by the time the loop reached it to mark it as uncollectable?
1/ It did in this case. Not really sure why off the top off my head
2/ I misunderstood, it's that it was already voided(not uncollectible) at the time , since you voided it in the API request https://dashboard.stripe.com/test/logs/req_qCGKx2n0HL8iM8 about 20 seconds before you tried to mark it uncollectible
for 1/ I assume it's because the subscription was unpaid for a long time and your settings on https://dashboard.stripe.com/settings/billing/automatic about "
If a recurring payment is incomplete for X days" maybe kicked in
for 1/ that's interesting, I will test again and see if that is the case.
for 2/ I think we're discussing the wrong invoice, here is the request
https://dashboard.stripe.com/test/logs/req_5J680BebOlZtaj
Why would voiding the first invoice in the list mark the failed one as uncollectable?
for 2/ I think we're discussing the wrong invoice, here is the request
https://dashboard.stripe.com/test/logs/req_5J680BebOlZtaj
that's the one I meant. That invoice was already voided at the time , since you voided it previously in the API request https://dashboard.stripe.com/test/logs/req_qCGKx2n0HL8iM8 about 20 seconds before you tried to mark it uncollectible in that request ^^ so that one fails.
Aren't they two separate invoices?
in_1KdXqdKl7yri9QNL3Qh06MDE
in_1IrKxaKl7yri9QNLKDu73H8x
Why would the request to void in_1KdXqdKl7yri9QNL3Qh06MDE mark in_1IrKxaKl7yri9QNLKDu73H8x as uncollectible?
Hi! I'm taking over karllekko.
I see there was some back and forth. Could you clarify your question?
I received an invalid request error when iterating through customer invoices and marking the failed one has uncollectable and when cancelling the subscription
I have run another test on a different customer without cancelling the subscription and marking the failed invoice as uncollectable and it seems like marking the draft invoices as void does it automatically, It'd would be good to get some context as to why this happens?
I received an invalid request error when iterating through customer invoices and marking the failed one has uncollectable and when cancelling the subscription
Got it! Can you share the request ID? I guess you already shared it, but I want to make sur eI look at the correct one.
Here
Thanks! Give me a few minutes to look into this.
So it looks like you tried to make the invoice in_1IrKxaKl7yri9QNLKDu73H8x as uncollectible twice in a row.
- The first call worked (2022-03-24 11:02:25 UTC): evt_1KgoQwKl7yri9QNLabHeT3g1
- The second one failed (2022-03-24 11:02:45 UTC) req_5J680BebOlZtaj
So it's expected that the second call failed.
In my code I am calling await stripe.invoices.markUncollectible(invoiceId); only once, so the confusion lies in why an earlier call to mark an invoice as void marks the invoice in_1IrKxaKl7yri9QNLKDu73H8x as uncollectible?
This is confirmed through this test where I don't call the .markUncollectible(invoiceId) method at all however the failed invoice still becomes uncollectible
Hi there 👋 jumping in, please bear with me a moment while I get caught up.
From what I'm seeing, it looks like since in_1KdXqdKl7yri9QNL3Qh06MDE was the latest invoice on sub_JU7pA2aDUSQui9, that voiding it also canceled the subscription. Then when the subscription was canceled it also closed its associated invoice(s), including in_1IrKxaKl7yri9QNLKDu73H8x.
I see, thanks for clearing that up, appreciate the help
Happy to help!