Delete an Invoice

This endpoint marks an invoice as deleted by assigning it a "deleted" status and updating the deleted_at timestamp. The deletion is "soft," meaning the invoice remains in the database but is no longer accessible to merchants or customers.


Key Features

  • Soft-deletes an invoice by updating its deleted_at timestamp.
  • Ensures the invoice is inaccessible to merchants and customers after deletion.
  • Prevents accidental permanent loss of data by retaining the record in the database.
  • Requires contacting the Stax Dev Team to reverse the deletion.

Usage Notes

Soft Deletion

  • This endpoint does not remove the invoice record from the database. Instead, it marks the invoice with a deleted status.
  • Invoices with a deleted_at value are hidden from merchants and customers.

Irreversible Without Assistance

  • Once an invoice is deleted, it cannot be undone through the API. You must contact the Stax Dev Team to reverse a deletion.

Impact on Customers

  • Deleted invoices become completely inaccessible to customers. Ensure the deletion is intentional before making the request.

Response Structure

CodeResponseReason
204No ContentThe invoice was successfully marked as deleted.
400Bad RequestInvalid or missing invoice ID.
401UnauthorizedAuthentication failed.
404Not FoundAn invoice with the specified ID does not exist.
500Internal Server ErrorUnexpected server error.

Important Considerations

  • Data Retention: The invoice remains in the database with its deleted_at timestamp set but is inaccessible through standard endpoints.
  • Reversing Deletion: If an invoice needs to be restored, contact the Stax Dev Team for assistance.
  • Customer Notifications: Ensure customers are notified of any significant changes if the deletion affects their interactions.
Language
Credentials
OAuth2
Click Try It! to start a request and see the response here!