#sai_rez-subscriptions

1 messages · Page 1 of 1 (latest)

little scroll
strange vale
#

For cancelled sub
req_IvkHZRy6Y6Wh4C

for invoice marked as uncollectible
req_5J680BebOlZtaj

customer ID
cus_JU7pW5XkwJQQQp

(Working on test mode fyi)

little scroll
#

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

strange vale
#

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.

  1. 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?

little scroll
#

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

strange vale
#

for 1/ that's interesting, I will test again and see if that is the case.

#

Why would voiding the first invoice in the list mark the failed one as uncollectable?

little scroll
strange vale
#

Aren't they two separate invoices?
in_1KdXqdKl7yri9QNL3Qh06MDE
in_1IrKxaKl7yri9QNLKDu73H8x

Why would the request to void in_1KdXqdKl7yri9QNL3Qh06MDE mark in_1IrKxaKl7yri9QNLKDu73H8x as uncollectible?

strange bobcat
#

Hi! I'm taking over karllekko.

#

I see there was some back and forth. Could you clarify your question?

strange vale
#

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?

strange bobcat
#

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.

strange bobcat
#

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.

strange vale
#

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?

strange vale
astral lion
#

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.

strange vale
#

I see, thanks for clearing that up, appreciate the help

astral lion
#

Happy to help!