According to the api docs, the ’ Get invoice’ method should return an ‘invoice’ object with the ‘order_id’ that links it back to the order containing the line items etc.
However I’ve found that when an invoice has the status ‘UNPAID’ the order_id is missing. If you look in the square dashboard, it does show the line items etc for that invoice. Is there any plan to make every invoice link back to an order_id so we can get the line_items for every invoice?
It would be super helpful for analysis purposes to expose this data through the API: i.e. how many items did i invoice for but have not been paid yet.
Currently Invoices created using the Seller Dashboard, POS application, or Square Invoices application do not include the
order_id field unless a payment has been made on the invoice. Invoices created using the Invoices API require the order ID and therefore always include the order ID. We’re constantly working to improve our features based on feedback like this, so I’ll be sure to share your request to the API product team.
That is awesome - thank you! Yeah from the Seller Dashboard you can see the data is there (items, quantities etc for the line items) but it’s just not exposed in the API currently. I’m guessing this is due to how square handles creating invoices/orders internally, but it would be great if it could be fixed and also more consistent.
Hello @Bryan-Square, we just noticed this terrible issue. We are syncing invoices with other accounting system and because of this we are having errors and we are missing invoices that never get paid. Is the order_id now included in invoices created other way than with the API? and when will it be included in all of them? Is this known issue documented anywhere? or just explained currently when will we get the order_id?
At this time for invoices that are created via the seller Dashboard the
order_id isn’t available till the invoice is paid for. This is a popular feature request and we hope to have more for you soon. It is documented in the Limitations section of our documentation.