#boggerrss
1 messages ยท Page 1 of 1 (latest)
Hey there
o/
You can add line items in-line, yes.
Are you creating one-off Invoices here?
What integration are you using?
Yes you probably need some more information
I would like it so that when I am completing a payment intent that I can update the linked invoice with items prices as apposed to having them linked directly via IDs so I will need to put prices in there which could be done via free text
As currently our integration isn't taking into account products purchased just a total sum
Oh also I was hoping the same solution works for stripe receipts ?
What integration are you using right now?
Can you be more specific on what you mean by that?
Currently using the stripe api via the php sdk if thats what you mean
Yeah are you using Stripe Checkout vs. Payment Element?
Are you creating PaymentIntents directly?
Ahh I see sorry, yeah I'm using Payment Element and creating PaymentIntents via the backend after creating a payment method via the frontend
Ah okay so you aren't creating Invoices through Stripe at all then
No not currently. That why I guess I need pointing in the right direction to achieve generating those invoices and also having products on reciepts (Ideally not directly linked)
We currently are using Stripe Connect so changing our underlying flow is a bit risky at the moment as we don't want to affect that, as customers use it
Gotcha, so what you can do is you can create Invoices directly here, which will in turn create a PaymentIntent. You would do that using https://stripe.com/docs/api/invoices/create. In terms of the line items themsevles, you create Invoice Items to be picked up by the Invoice (https://stripe.com/docs/api/invoiceitems/create). You can use price_data (https://stripe.com/docs/api/invoiceitems/create#create_invoiceitem-price_data) to create the Invoice Items in-line so that you don't have to create the actual Price ID ahead of time.
So the invoice gets created and creates the payment intent I can then use that payment intent as I normally do?
Would this also add line items for the recepit?
Yep
The receipt is now sent as an Invoice receipt instead of a normal charge receipt
So yes there will be line items on the receipt
I'd recommend testing this out!
Yes of course we have a UAT environment thanks for all your help ๐
Sure thing ๐