#lucas_dispute-paymentintent-invoice

1 messages ยท Page 1 of 1 (latest)

copper novaBOT
#

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

potent bane
#

Hello there

stark root
#

Hello

potent bane
#

So this is a little more challenging now.

copper novaBOT
potent bane
stark root
#

So i limit the response of invoice payments list to one and get the invoice id of the first, right?

boreal badge
#

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

stark root
#

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

boreal badge
#

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

stark root
#

Oh ok

#

Thanks

boreal badge
#

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

stark root
#

So the correct way to retrieve the invoice id by the payment intent would be like this? Just to be sure

boreal badge
#

~No that is how you get Payment Intents if you already know the Invoice~

NVM, yes this is how you would get this information

stark root
#

Ok

#

tysm