Publishes the specified draft invoice.
POST
/v2/invoices/{invoice_id}/publish
Publishes the specified draft invoice.
After an invoice is published, Square follows up based on the invoice configuration. For example, Square sends the invoice to the customer's email address, charges the customer's card on file, or does nothing. Square also makes the invoice available on a Square-hosted invoice page.
The invoice status
also changes from DRAFT
to a status based on the invoice configuration. For example, the status changes to UNPAID
if Square emails the invoice or PARTIALLY_PAID
if Square charges a card on file for a portion of the invoice amount.
In addition to the required ORDERS_WRITE
and INVOICES_WRITE
permissions, CUSTOMERS_READ
and PAYMENTS_WRITE
are required when publishing invoices configured for card-on-file payments.
Guide
The version of the invoice to publish. This must match the current version of the invoice; otherwise, the request is rejected.
A unique string that identifies the PublishInvoice
request. If you do not provide idempotency_key
(or provide an empty string as the value), the endpoint treats each request as independent.
For more information, see Idempotency.