admin-payments

Regenerate Invoice Pdf

Regenerate the invoice PDF synchronously and return the fresh invoice.

Applies any requested tax-mode / post-tax line-item adjustments (gated to PO + unpaid invoices), then re-renders the invoice PDF inline and overwrites the existing object at the same R2 key. Because the render completes before this returns, the response carries the up-to-date invoice (with a freshly-signed PDF URL) and the next download is guaranteed current — no client-side polling for pdf_generated_at to advance. Useful after template changes (e.g. adding the Remit To block) or after corrections to quote line items on an already-issued invoice.

exclude_tax (optional) flips the invoice's tax mode before re-rendering — true removes tax, false restores it from the Payment. additional_line_items_post_tax (optional body) replaces the invoice's post-tax extras ([] clears, omitted = unchanged). Both are gated to PO + unpaid invoices. Omit both to re-render unchanged.

Requires payments:edit permission.

post/api/v1/admin/payments/{payment_id}/regenerate-invoice-pdf

Path parameters

payment_idstring uuid required

Query parameters

exclude_taxboolean nullable

Request body

Response

Successful Response

idstring uuid required
payment_idstring uuid required
project_idstring uuid required
invoice_numberstring required
display_numberstring nullable
statusstring required
amountstring required
subtotalstring nullable
tax_amountstring nullable
tax_ratestring nullable
tax_excludedboolean
currencystring required
issued_atstring date-time nullable
paid_atstring date-time nullable
invoice_pdf_urlstring nullable
pdf_generated_atstring date-time nullable
notesstring nullable
created_atstring date-time required
updated_atstring date-time required

Changes

No recorded changes to this endpoint across all 1 revision of this API.