Delete Payments
delete_paymentsPermanently delete analytics payment records, without issuing refunds or changing a payment provider. Delete 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 record a refund that already occurred, use track_payment with isRefund; it only updates analytics. 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. | |
| workspaceId | No | Workspace to act in: an id from list_workspaces. Omit to use the default workspace. Use the same workspaceId for every call about the same workspace, since ids from one workspace do not exist in another | |
| 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. |