square/square-php-sdk

Feature Request: Include line items on Invoice Object

Closed this issue · 1 comments

The Square\Models\Invoice Object does not include lineItems like the Order Object. For our business process, we need to be able to query the Invoices and move that data over into Quickbooks Online. The Invoice object, before it has been paid, has no line items or order id associated with it. So as far as I can tell, there's no way to query a list of line items or get other detailed information like taxes applied from an invoice.

Note, once an invoice is paid this information is available through the associated order. But this is not what we're talking about. We need the invoice in our quickbooks environment before the invoice gets paid. Additionally, sometimes the invoice is never paid through square, but only in the accounting system.

Please update the API and expose these invoice data points.

Unfortunately this is a known thing (no order_id before an invoice has been paid). This is on the Invoices team, not the PHP SDK team, so I will be closing this issue for now. This is also documented in our doc page:

When you create an invoice using the Invoices API, the order ID is required. However, an invoice created using the Seller Dashboard, the Square Point of Sale application, or the Square Invoices application is created without an order ID. When you retrieve such an invoice using the Invoices API, the invoice does not have an order ID field set.
I believe it should be slightly updated to say "until the invoice has been paid".