"Best analytics tool I've used in 14 years"

Delete payments

DELETE https://datafa.st/api/v1/payments

Delete payment and free-trial records by transaction, visitor, or time range.

Request

Authentication

  • df_ website API key for one website.
  • dft_ account token with payments:write. Pass websiteId as a query parameter.

Query parameters

ParameterTypeRequiredDescription
transaction_id / tx_idstringNoUnique transaction ID from your payment provider. Used for idempotency and deletion. Delete one payment or free trial by transaction ID. Highest priority.
datafast_visitor_idstringNoDataFast visitor UUID from the browser cookie or client SDK. Used to attach server-side events to a visitor journey. Delete all payments/free trials for one visitor.
startAt / endAtstringRequired for bulk deleteStart of the reporting window. Use it with endAt to query a specific date range instead of the endpoint default. Required when deleting without transaction or visitor.
start / endstringNoOptional range for visitor-based deletes.

Response

Returns a JSON object with status and endpoint-specific fields.

Response fields

FieldTypeDescription
statusstringsuccess.
data[].messagestringHuman-readable confirmation or status message for the operation.
data[].transaction_idstringUnique transaction ID from your payment provider. Used for idempotency and deletion.
data[].datafast_visitor_idstringDataFast visitor UUID from the browser cookie or client SDK. Used to attach server-side events to a visitor journey.
data[].timeRange.startstringPresent for time range deletes.
data[].timeRange.endstringPresent for time range deletes.

Errors

Common errors include 400 for invalid input, 401 for missing or invalid tokens, 403 for missing permission or suspended tracking, 404 for missing resources, and 500 for server errors.

✍️ Something missing? Suggest features.

🤖 AI agent or LLM? Read this page as markdown

Example request
curl -X DELETE "https://datafa.st/api/v1/payments?transaction_id=payment_456" \
  -H "Authorization: Bearer df_xxx"
Success response
{
  "status": "success",
  "data": [{
    "transaction_id": "payment_456",
    "message": "Payment deleted successfully"
  }]
}