Update an Invoice

Alter or update an invoice.

Updates the details of an existing invoice, allowing for modifications to items, taxes, memos, and more. This endpoint is ideal for making corrections or adding additional details to an invoice before it is finalized.


Key Features

  • Updates an invoice's details, such as:
    • Items and quantities.
    • Tax amounts.
    • Attached files (e.g., supporting documentation).
    • Reference numbers or memos.
  • Maintains all existing invoice relationships, such as payments and customer associations.
  • Prevents editing of fully paid invoices for data integrity.
  • Ensures compatibility with third-party integrations like QuickBooks Online by retaining critical metadata.

Usage Notes

Editable Fields

  • The fields that can be updated are the same as those used when the invoice was created. Key editable attributes include:
    • Items: Modify or add items in the invoice.
    • Taxes: Update or apply tax amounts.
    • Memo: Add or change a memo visible to customers.
    • Files: Attach or update supporting files (e.g., contracts or receipts).
    • Reference Numbers: Update reference details for internal tracking.

Restrictions

  • Fully paid invoices cannot be edited. Attempting to update such invoices will result in an error.
  • Be cautious when modifying metadata (meta fields). These fields may affect integrations like:
    • Receipt emails.
    • The invoice page in the Stax Pay platform.
    • QuickBooks Online integration.

Unusual Behavior Risk

  • Removing or altering metadata fields in the meta object might lead to unintended behavior in downstream systems. For instance:
    • Missing fields may result in incorrect invoice display.
    • Integration features relying on metadata might fail.

Response Structure

CodeResponseReason
200SuccessThe invoice was successfully updated.
400Bad RequestInvalid or unmodifiable fields provided.
401UnauthorizedAuthentication failed.
404Not FoundAn invoice with the specified ID does not exist.
422Unprocessable EntityAttempt to update a fully paid invoice.
500Internal Server ErrorUnexpected server error.

Important Considerations

  • Fully Paid Invoices: Once an invoice is fully paid, no further edits are allowed to ensure payment integrity.
  • Metadata Changes: Only update metadata if necessary and with an understanding of how it impacts integrations and downstream systems.
  • Audit Trail: Changes to invoices are logged to maintain a record of updates for compliance and transparency.
  • Customer Communication: If an invoice is updated after being sent, consider notifying the customer to avoid confusion.
Language
Credentials
OAuth2
Click Try It! to start a request and see the response here!