#cm5061_paymentintents-invoicepayments-invoices
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/1465772920080171172
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- cm5061_basil-replace-forever-coupons, 4 days ago, 15 messages
Hi there,
generally speaking every Charge should have a Payment Intent attached. That's how the Stripe logic works. Only exception would probably be, when you create a charge directly, but do not recommend that approach.
The doc you shared shows how to use the InvoicePayments API (nit Invoice API) to retrieve all InvoicePayments related to a Payment Intent. Each Invoice Payment is attached to an invoice. Through the Payment Intent, you get to the Invoice Payments, and with a Invoice Payment you get to the Invoice.
Got it, understood.
The doc you shared shows how to use the InvoicePayments API (nit Invoice API) to retrieve all InvoicePayments related to a Payment Intent.
Maybe I'm misunderstanding something about PaymentIntents, but how could a PaymentIntent be associated with multiple InvoicePayments (and theoretically multiple Invoices)?
One Payment Intent can be associated to multiple InvoicePayments. An InvoicePayment should only be associated to one Invoice. I just double checked and looking at the API reference it shows, that the invoice property on the Invoice Payment Object is a string, which mean it would allow only one value https://docs.stripe.com/api/invoice-payment/object#invoice_payment_object-invoice
Right, sorry, that's the point that I'm trying to get at. There is a 1-1 between InvoicePayments and Invoices, but a 1-Many between PaymentIntents and InvoicePayments. Which means theoretically a PaymentIntent (through InvoicePayments) could be associated with more than one Invoice? Maybe that's just theoretical and not practical though?
It's theoretical I would say. A Payment Intent normally gets created through the invoice. So there is a (imagined) 1:1 relation. But the Payment Intent can be paid in mutliple actual Payments from a user. So there is a 1:many relationship.
Beautiful, so expected that a PaymentIntent might have multiple partial payments, but unexpected for them to be for different Invoices.
Thanks for the clarification, appreciate it!
No problem. Always happy to help