How to publish invoice when customer has no email set

Some of customers will not provide us with email but we still want to publish invoices and share links manually or just print and hand over a paper invoice.

Square invoice cannot be published when customer does not have email

Due to documented Requirements and limitations we cannot publish invoice when the customer does not have an email set.

The customer profile must include email_address or phone_number. An email address is required if the invoice is delivered by email or configured for automatic payment.

Trying to do so will result in the error:

[
  {
    'code': 'BAD_REQUEST',
    'detail': 'Payer email is required',
    'field': 'invoice.primary_recipient.customer_id',
    'category': 'INVALID_REQUEST_ERROR'
  }
]

The Invoice.status is read-only and cannot be changed with Update invoice api call.

Yet, we can “Create” invoices that have been created as draft using the API:

Our Merchants do not want the overhead of going to Square, editing and clicking of “Create” to get the invoice published.

How can we replicate the process available in Square Dashboard using the API?

:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:
https://developer.squareup.com/docs/invoices-api/create-publish-invoices

Additional Documentation

Create and Publish Invoices
Square Developer
Update Invoices

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

You still can’t publish the Invoice in the Dashboard without the email address.


:slightly_smiling_face:

I just did it in production and in sandbox both. I will send you the invoices through a DM.

  1. Can you check what I and you do differently?
  2. And how to replicate my actions through the API?

I would rather find a solution that would allow moving and invoice to “Unpaid” status than confirming that it’s not supported :smiley: