Delete Payments
delete_paymentsPermanently delete payment records by transaction ID, visitor ID, or creation date. Irreversible. Confirm filters and range before use.
Instructions
Permanently delete payment records matching every filter given (filters combine with AND): one transactionId, all payments of a visitorId, and/or a createdAt window. At least one of transactionId, visitorId, startAt, or endAt is required or the call fails before reaching the API; startAt and endAt are independent, so one bound alone is allowed. Without a date range, matches are deleted across the whole history. Returns the number of rows deleted. Cannot be undone and removes revenue from every report and visitor profile, so restate website, filters, and range and get explicit confirmation first. To reverse a charge while keeping history, use track_payment with isRefund instead. Requires websiteId or domain with a workspace token.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| endAt | No | ISO 8601 end of the deletion window, inclusive (e.g. "2026-01-31T23:59:59Z"). May be used without startAt. | |
| domain | No | Website domain from list_websites (e.g. "example.com"). Alternative to websiteId with a workspace token. | |
| startAt | No | ISO 8601 start of the deletion window, inclusive (e.g. "2026-01-01T00:00:00Z"). May be used without endAt. | |
| visitorId | No | Delete all payments of this visitor (the id get_visitor takes) | |
| websiteId | No | Website ID from list_websites. Required with a workspace token unless domain is given; ignored with a website key. | |
| transactionId | No | Delete the single payment with this transaction ID. Combined with the other filters using AND. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | No | Object with status and data: deleted (number of payment records removed) and a confirmation message. |