Soft deletes a scheduled invoice from a merchants account.
Soft deletes a scheduled invoice from a merchant's account, making it inaccessible to the merchant and customers while retaining the record in the database for audit purposes.
Key Features
- Marks the scheduled invoice as deleted by setting the
deleted_at
field to the current time. - Prevents future charges and clears any scheduled actions (
next_run_at
set tonull
). - Removes future occurrences (
future_occurrences
set to an empty set). - Ensures the deleted invoice is no longer accessible via API or merchant interfaces.
Usage Notes
Soft Deletion
- Deletion is a non-reversible process that does not remove the record from the database but instead marks it as deleted.
- The
deleted_at
timestamp will indicate when the scheduled invoice was deleted.
Impact on Scheduling
- The
next_run_at
field is cleared, ensuring no further invoices are generated. - The
future_occurrences
field is set to an empty set, reflecting that no future invoices will occur.
Retention
- The scheduled invoice remains in the database for reference and audit purposes but is inaccessible through the API or UI.
Response Structure
Code | Response | Reason |
---|---|---|
200 | Success | The scheduled invoice was successfully marked as deleted. |
400 | Bad Request | Invalid ID or missing required parameters. |
401 | Unauthorized | Authentication failed. |
404 | Not Found | The specified scheduled invoice does not exist. |
500 | Internal Server Error | An unexpected server error occurred. |
Important Considerations
Final Action: Once marked as deleted, the scheduled invoice cannot be reactivated or undeleted without contacting support.
Effect on Active Status: Deleting a schedule does not modify its active
field but will prevent any future occurrences.
Data Accessibility: Scheduled invoices with a deleted_at
value are inaccessible to merchants or customers via the API or the UI.
Audit Trail: The deletion action is logged, ensuring that the record is available for compliance and audit purposes.