#lucas_dispute-paymentintent-invoice
1 messages ยท Page 1 of 1 (latest)
๐ 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/1362451518284107886
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hello there
Hello
Yes this changed with the latest API version, see: https://docs.stripe.com/changelog/basil/2025-03-31/add-support-for-multiple-partial-payments-on-invoices#why-is-this-a-breaking-change
So this is a little more challenging now.
Instead now you need to use the List Invoice Payments API: https://docs.stripe.com/api/invoice-payment/list
And you would pass in the PaymentIntent ID via payment.payment_intent: https://docs.stripe.com/api/invoice-payment/list#list_invoice_payments-payment-payment_intent
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So i limit the response of invoice payments list to one and get the invoice id of the first, right?
Hi ๐
I'm stepping in as my colleague needed to go.
Since you have the Payment Intent already from the Dispute object, I think you can use the Invoice List API and filter by Payment Intent ID to get the Invoice
Yes
But the response is an array, it will always have only one element right?
because a intent can only belong to one invoice i think
That is because this is a List API so it will always return an array, even if there is only one item
Yes a single Payment Intent can only be related to one Invoice
but we are moving to world where a single Invoice can have multiple Payment Intents
So that's why you have go take this approach
Sure thing! I generally think that if we can explain the "why" our APIs behave in certain ways, it helps people remember how they work
So the correct way to retrieve the invoice id by the payment intent would be like this? Just to be sure
~No that is how you get Payment Intents if you already know the Invoice~
NVM, yes this is how you would get this information