Soft deletes a scheduled invoice from a merchants account with audit trail preservation.
Deletes a scheduled invoice from a merchant's account, making it inaccessible to the merchant and customers. The deleted schedule remains in the system database for audit purposes.
What Happens During Deletion
The scheduled invoice delete call performs the following actions:
- Marks the scheduled invoice as deleted by setting the
deleted_atfield to the current time - Prevents future charges and clears any scheduled actions (
next_run_atset tonull) - Removes future occurrences (
future_occurrencesset to an empty set) - Ensures the deleted invoice is no longer accessible via API or merchant interfaces
- The
next_run_atfield is cleared, ensuring no further invoices are generated - The
future_occurrencesfield is set to an empty set, reflecting that no future invoices will occur
Important Considerations
Deletion Audit
Deletion is a non-reversible process that does not remove the record from the database but instead marks it as deleted.
Once marked as deleted, the scheduled invoice cannot be reactivated or undeleted without contacting support.
The deleted_at timestamp will indicate when the scheduled invoice was deleted.
The scheduled invoice remains in the database for reference and audit purposes but is inaccessible through the API or UI.
Active Field Behavior
Deleting a schedule does not modify its active field but will prevent any future occurrences.
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. |
