#mytras-formo_api
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/1262686458662096917
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, let me help you with this.
hi
The line items is an array which suports multiple items, what's the challenge exactly?
I am receiving information in a payload from a different platform, I need to add multiline items to the invoice with the correct product
I usually do a search product by name and metadata
that is how I add the correct product to the empty invoice
To make sure that we are charging the correct item with correct description to the customer I need to do a search
or is it possible to just create new line items without the need of having a product?like it happens in different billing platforms?
Not sure I understand the problem. Is it about multiple line_items? Or searching for the correct Product? Or creating Prices on the fly/dynamically?
It is a bit tricky to explain
let me show you a couple of screenshots
These are the steps that I create in my automation in Zapier
I first create an empty invoice, than I fill the invoice with the items needed for the invoice
addding the correct price
in order to add the items to the invoice I need a price id, or so I believe, is there a way to not need that and create dynamic items that will not need to be created before hands?
Right, sorry, Invoices don't have the line_items parameter. You have to make separate calls to create Invoice Items.
Yes, there's price_data parameter to create Prices dynamically: https://docs.stripe.com/api/invoiceitems/create#create_invoiceitem-price_data
However, you will still need to use a Product ID.
oh ok, than it will be easier to create the product before hand
so basically, if the invoice needs to contain more than 1 item
I need to repeat the step to create an invoice item for as many time as the products are that I want to add to the invoice
correct?
Yes
Happy to help.
You too