#bruno_error

1 messages ยท Page 1 of 1 (latest)

grizzled yewBOT
#

๐Ÿ‘‹ 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/1414611479306571909

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

gritty mirage
#

Here's a screenshot from an API logs page. It shows an API request errors for a while, then it succeeds.

faint hemlock
#

Hi, it looks like you used Test Clocks: https://dashboard.stripe.com/test/logs/req_C5Pxr2uatv5QGH on that subscription, sub_1S55OAEw1pvGCo9Ved7rzEMb

The void request that worked, https://dashboard.stripe.com/test/logs/req_gKgCUh1QJS1e5y was made at 2025-09-08 13:45:42 UTC using Test Clocks

The payment was in an action required state until evt_3S55OBEw1pvGCo9V0if2EGR4

Any requests made to voide while the payment method was in that state will not work.

These are not Stripe retries, rather your code using a third party plugin RailsBilling is making these calls explicitely

gritty mirage
#

All true, sorry for my weird language, yes, I'm aware I'm making API retries (I'm working on RailsBilling plugin itself).

#

Let me check what's going on with this event evt_3S55OBEw1pvGCo9V0if2EGR4 you pasted, this is something I was not aware of.

grizzled yewBOT
gritty mirage
#

Ok, so the event you provided is "payment_intent.payment_failed". Are you sure a payment intent needs to fail before an invoice can be voided? I think this requirement didn't exist before? I'm pretty sure I was able to immediately void invoices even if PaymentIntent didn't fail.

#

I'll try to reproduce this scenario now and pass a link

twilit grove
#

You don't need an invoice to fail before you void it

#

You just can't void it if it has a payment intent in a requires_action state

#

Which is the issue here

gritty mirage
#

Ok, I was testing stuff for a while and I can't confirm this:

"You just can't void it if it has a payment intent in a requires_action state"

I just got a payment intent to requires_action and was able to void the related invoice from a first try.

#

I just wanted to provide an update to the thread. I will not try again to be 100% sure and pass links to invoice and payment intent.

twilit grove
#

I just got a payment intent to requires_action and was able to void the related invoice from a first try.
Please share the request id so I can take a look

gritty mirage
#

Ok, here's the state of things before I attempt 'void_invoice':

app(dev)> Stripe::Invoice.retrieve("in_1S56WeEw1pvGCo9VbrRaEFoi").status => "open" app(dev)> Stripe::Invoice.retrieve("in_1S56WeEw1pvGCo9VbrRaEFoi").payment_intent => "pi_3S56WeEw1pvGCo9V11jZw9YO" app(dev)> Stripe::PaymentIntent.retrieve("pi_3S56WeEw1pvGCo9V11jZw9YO").status => "requires_action"

#

So payment intent is clearly in 'requires_action' state.

#

I now attempt to void invoice and it works just fine:

app(dev)> Stripe::PaymentIntent.retrieve("pi_3S56WeEw1pvGCo9V11jZw9YO").status => "requires_action" app(dev)> Stripe::Invoice.void_invoice("in_1S56WeEw1pvGCo9VbrRaEFoi") => ... returns voided invoice

Here's the relevant request: https://dashboard.stripe.com/test/logs/req_0694n2IdVMCX6A

#

So, if you can confirm it's ok to void invoices with related 'requires_action' payment intent, maybe we can look at that scenario from the start of the thread?

twilit grove
#

Yeah let me compare the 2 to see what's going on

gritty mirage
#

Thanks

#

Ok, I can consistently reproduce this:

  • Ok scenario: subscription invoice with "requires_action" payment intent can be voided from the first try.
  • Not ok scenario: subscription invoice - when payment intent is failed via the UI - must wait about 30-ish seconds before invoice can be voided.
twilit grove
#

Ah ok

#

I'm not sure what the expected behavior is then

#

I'm checking with a colleague. Idk why there's a 30 second delay

gritty mirage
#

Thanks

#

I'm always running test clocks. Will check if this behavior happens without test clocks.

#

Ok, I can confirm I'm getting the same behavior without test clocks.

#

API does not allow me to void an invoice for 30-ish seconds after "invoice.payment_failed" event.

#

Same behavior and error message via web dashboard

#

I just waited a while, clicked the same button on the same modal with an error and invoice was voided.

grizzled yewBOT
livid marsh
#

๐Ÿ‘‹ stepping in as codename_duchess had to step away

#

Catching up

gritty mirage
#

Thank you!

livid marsh
#

Okay it looks like there is already an internal investigation underway for this and work on a fix ongoing. Sounds like the root cause is a race condition that was introduced. I can't give you an exact timeline on when this will be fixed but you can write into our Support team via https://support.stripe.com/contact/login and they can update you as soon as this is fixed up.

gritty mirage
#

Thanks for confirming this. Is there any kind of name or reference when I ask support for the status of this bug?

livid marsh
#

Actually hold on one second.

#

There may be a fix rolling out right now.

#

@gritty mirage can you test again here?

gritty mirage
#

Hi, sure

#

Good news, I can confirm I was able to void an invoice via dashboard (it was erroring previously)

#

Ok, case closed I guess