Skip to main content
CrispStats stores each payment once per site, provider and payment id. A webhook that arrives twice, a webhook and a history import of the same sale, or a payments API call retried with the same transactionId are all recorded once. When revenue still looks too high, the same sale reached CrispStats twice under two different identities. This page lists the ways that happens and how to fix each.

Find the duplicate

Open Revenue and look at Payments for the day of the sale. A duplicate shows as two payments with the same amount within a few minutes of each other. The provider column tells you where each came from: a provider’s name for a connected integration, API for the payments API, a revenue event or crispstats.revenue(). To check from code, list the day’s payments with GET /api/v1/sites/{siteId}/payments (see the API reference) and compare amount, timestamp and provider.

The causes and their fixes

A sale recorded by a connected provider (Stripe, Paddle and the others) and sent again through the payments API counts twice: the two copies have different providers, so neither is a repeat of the other.Fix: report each sale one way. Keep the provider integration and stop sending those sales to the API, then delete the API copies:
Deleting only ever removes payments recorded through the API. The provider’s copies stay.
A revenue event sent to the collector (POST https://in.crispstats.com/e) is recorded as a new payment every time it is accepted. A retry after a timeout records the sale a second time.Fix: send payments to the payments API with your order or invoice id as transactionId. A retry with the same id answers duplicate: true and records nothing. Delete the extra copy by its time, as below.
The payments API recognises a repeat only by transactionId. If one call sends the checkout session id and a later one the invoice id for the same sale, both are recorded.Fix: pick one id that never changes for a payment, such as your order id, and use it in every call, retries and backfills included. Delete the copy recorded under the other id:
crispstats.revenue() on the thank-you page and a server call for the same order are two payments. Reloading the thank-you page adds another each time.Fix: remove crispstats.revenue() from the page and report from the server only, with a visitorId saved at checkout so the sale keeps its attribution. See pass the visitor id.
A provider connected to two sites, or one API key used for two site ids, records the sale on both. Each site’s revenue is right on its own; added together they count it twice.Fix: connect each provider account to the one site it sells for, and send each payment to that site’s id.

Delete the extra copy

The extra copy is easiest to remove by the filter that matches only it: A request without a filter deletes nothing. Reports, the visitor’s revenue and the daily figures behind digests and alerts are updated straight away. To remove a connected provider’s test payments instead, list them on Revenue and use Remove test payments.

What is never counted twice

  • A provider’s webhook delivered more than once.
  • A webhook and the history import of the same payment.
  • A payments API call repeated with the same transactionId, including a refund repeated with the same sale and amount (or the same refundId).
  • A refund that arrives before its sale: it waits and counts once, when the sale arrives.
Last modified on December 3, 2026