#tomamenitiz

1 messages ยท Page 1 of 1 (latest)

vagrant dragonBOT
normal brook
#

This is the ruby code I'm using to create the invoice with the Stripe SDK:

Stripe::Invoice.create({
        customer: customer,
        pending_invoice_items_behavior: "exclude",
        default_tax_rates:,
        auto_advance: false,
        metadata: { concept: },
      })
lavish otter
#

Hi there ๐Ÿ‘‹ could you provide examples of Invoices from before and after the change so I can take a closer look at what might be happening?

normal brook
#

The InvoiceItems code:

Stripe::InvoiceItem.create(
          invoice: invoice.id,
          customer: customer,
          amount: item[:amount],
          currency: item[:currency],
          description: item[:description],
        )

And the payment code:

Stripe::Invoice.pay(invoice.id, { paid_out_of_band: true })

They all happen secuentially in the same thread, so only a couple hundred milliseconds appart

#

Sure, although I'm not confident we'll be able to see something in the invoice

lavish otter
#

Thank you, please bear with me a couple minutes while I look through those.

normal brook
#

(same customer too)

#

sure, take your time! It's possible i'm doing something incorrectly, and would love to fix it

#

thanks in advance

lavish otter
#

Hm, this does look odd, will need some more time to dig.

normal brook
#

No worries, I can wait

lavish otter
#

Sorry, I'm not readily spotting what could be happening here, checking with my teammates to see if anyone has seen this before. If not I'll likely need to ask you submit this as a ticket so a deeper investigation can be performed.

normal brook
#

Sure, will do so with pleasure

#

It would be a relief if something happened to be broken on your side and not mine for a change... Although we'd still be far from even ๐Ÿ˜…

lavish otter
#

haha, that's the chuckle I needed today, thank you!

vagrant dragonBOT
normal brook
#

Let me know if you find something, otherwise I'll open a support ticket and hope that we can find a solution that way ๐Ÿ™‚

lavish otter
#

Will do! My teammate is currently taking a look to see if I overlooked anything.

lavish otter
#

Thank you for your patience while we looked, nothing is jumping out at either of us. If your account was granted access to any beta features during that timeframe, then it may be worth reaching out to the contact you were provided for that beta to see if it could be causing this behavior. Otherwise I would recommend opening a support case for this so a deeper investigation can be done.

normal brook
#

I don't think we've been given access to any beta features; so I'll go with the ticket

#

Any method you suggest for this type of case? Email? Chatbot?

#

I was thinking there's a possibility that the change is due to a race condition? As in, somewhere before July 2nd, your system was slower to issue the payment intent than my system was to mark the Invoice as already paid_out_of_band; but it's now reacting faster? As I understood from the docs though, the PaymentIntent shouldn't be generated when creating the invoice with auto_advance: false; so I might be overthinking this

lavish otter
#

Payment Intents shouldn't be created until the Invoice is finalized, which your flow isn't doing since you're marking them as paid out of band while they're still in a draft state. Technically it looks like the finalization is happening as part of the request to pay the Invoice, so I don't know why an intent would be getting created as part of that process.

I tried to reproduce this behavior in my test account, but was unable to do so. Are you able to reproduce this behavior in test mode, or is it exclusive to live mode?

normal brook
#

I'll give it a try in test mode an circle back at you if you are curious. Otherwise feel free to close the thread, as you've lended me enough of your time already

#

It does happen on my test account too:

#

I'll write the ticket; thank y'all for your help!