Delete payments
Delete payments and free trials recorded through the API, never a connected provider’s. Needs a key with the Revenue and payments: write permission (keys made before permissions: the events, write or admin scope). Filters apply in this order: transactionId (the sale and its refunds; dates are ignored), then visitorId (dates optional), then a range, which needs both from and to. With no filter nothing is deleted. Up to 1,000 payments a call; when more is true, call again. Reports and rollups are updated to match.
Authorizations
An API key that starts with cs_sk_, created under API and MCP, API keys. A key covers every site of its workspace or a chosen list, and carries permissions per resource (Analytics, Revenue and payments, Goals and events, Funnels, Sites, Notes, Alerts) and extras (Visitor details, Raw events export, Team members, Workspace name, See API keys, Manage API keys). A change acts for the key's creator, with their current role. A request outside them answers 403 naming the missing permission.
Query Parameters
Response
What was deleted.