#tomamenitiz
1 messages ยท Page 1 of 1 (latest)
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: },
})
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?
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
https://dashboard.stripe.com/invoices/in_1NSzlgIsA9C1ybP0JyjGEYvs this one created a new payment
https://dashboard.stripe.com/invoices/in_1NEMKqIsA9C1ybP09N5iYMtt
this one was created the same way, and it did not
Thank you, please bear with me a couple minutes while I look through those.
(same customer too)
sure, take your time! It's possible i'm doing something incorrectly, and would love to fix it
thanks in advance
Hm, this does look odd, will need some more time to dig.
No worries, I can wait
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.
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 ๐
haha, that's the chuckle I needed today, thank you!
Let me know if you find something, otherwise I'll open a support ticket and hope that we can find a solution that way ๐
Will do! My teammate is currently taking a look to see if I overlooked anything.
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.
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
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?
For ticket submission I would recommend using this form and check the box indicating you're a developer:
https://support.stripe.com/contact/email?topic=api_integration
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:
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I'll write the ticket; thank y'all for your help!