Skip to main content
DELETE
Delete payments

Authorizations

Authorization
string
header
required

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.

Path Parameters

siteId
string
required

The site's id, from GET /sites. The demo site is read-only.

Query Parameters

transactionId
string

The sale's transactionId. Deletes it and its refunds.

visitorId
string

Deletes this visitor's payments, inside from..to when given.

from
string

Start: a day (YYYY-MM-DD, in the site's timezone) or an ISO timestamp, inclusive.

to
string

End: a day (inclusive, the whole day) or an ISO timestamp (exclusive).

Response

What was deleted.

deleted
integer
required

Sales deleted.

refunds
integer
required

Refunds deleted.

waitingRefunds
integer
required

Refunds that were waiting for a sale, dropped.

trials
integer
required

Free trials (trial: true) matching the same filter, deleted.

more
boolean
required

More payments match: call again with the same filter.

filter
object
required

The filter that was applied, with the range as ISO timestamps.