I was reading over the invoices api documentation and from what I could tell the person I’m creating the invoice for needs to have a customerId associated to them to do this.
the language here https://developer.squareup.com/docs/invoices-api/overview
seemed to suggest that was the case
The Invoices API requires an order ID and a customer ID to create and publish an invoice. This enables built-in integration with the Orders API and Customers API. For example, the Invoices API ensures that the invoice payment requests are equal to the total order amount and retrieves the customer's email address from the customer profile.
I was wondering if I could just send it to an email / phone without needing a customer ID In the event the customer doesn’t already have a square account?
A secondary question I had was for the invoices is there a field to set that lets it automatically cancel/delete the invoice after a set amount of time such as 15 minutes? That way I can trigger a webhook for the invoice to update my API.
Thanks for your help,