one_time, subscription_new, subscription_renewal or refund. The kind decides which figure a payment counts toward on the Revenue screen. This page lists how each provider’s events map to those kinds, how duplicate webhooks are prevented, what is kept of the customer’s email, and how to export your payments as CSV.
Payment kinds
Amounts are integers in minor units of the payment’s own currency. Refunds are stored as negative amounts, so they show with a minus sign in the payments table and in the CSV export.
A customer’s first
one_time or subscription_new payment is their first payment. First payments feed Conversion rate and Median time to first payment. CrispStats recognises the same customer by email hash, then user id, then visitor id. The Time to convert section counts every one_time and subscription_new payment in the range.
MRR sums each subscriber’s latest subscription_new or subscription_renewal payment, if it was made in the 31 days before the end of the selected range.
How each provider is recorded
Refunds reported as running totals
Stripe, Lemon Squeezy and Polar report the total refunded so far on a charge or order, not the latest refund. For Stripe, CrispStats takes the previous total from the event itself. For Lemon Squeezy and Polar, it remembers the last total it recorded for each order (for 400 days) and stores only the difference. Either way, two partial refunds become two refund rows, and a redelivered refund records nothing new.Attribution of renewals and refunds
Renewals and refunds often arrive without the visitor id you passed at checkout. When a subscription renewal or a refund has neither a visitor id nor a user id, CrispStats gives it the attribution of the customer’s first attributed payment with the same provider and the same email hash. Only renewals and refunds carry attribution over this way, and never from another provider. A new sale (a one-time payment or the first payment of a subscription) is never matched by email: if it arrives without the visitor id or user id from its own checkout, it stays unattributed. Paddle payments have no email, so a Paddle renewal or refund is attributed only when its owncustom_data carries the id. For Stripe subscriptions, putting crispstats_visitor_id in the subscription’s metadata attributes renewals directly.
Deduplication
Every payment is stored under an id taken from the provider’s own ids, the same for every event that describes that charge: the Payment Intent of a one-time Stripe Checkout payment, the invoice of a subscription payment, the order, transaction or payment elsewhere, and the refund or adjustment for a refund. The database keeps at most one payment per site, provider and id, so a second event for the same charge (a Checkout Session and its Payment Intent that both carry the visitor id, the Checkout event and the firstinvoice.paid of a subscription, or any redelivery) is answered with 200 and adds nothing.
Refunds that arrive as running totals are handled separately, as described above.
The payment API has no such id: each accepted request is a new payment. See the warning on retries.
Customer email hashing and masking
When a provider includes the customer’s email, the collector turns it into two values and discards the address:- A hash: SHA-256 of the trimmed, lowercased address. It links a customer’s renewals and refunds to their first payment and identifies their first payment. It is not shown anywhere.
- A masked form: the first character of the local part and of the domain, with the rest of the domain kept from its first dot.
jane.doe@example.co.ukbecomesj***@e***.co.uk. It is shown in the payments table and the CSV export, enough to recognise a customer, not to contact them.
Export payments as CSV
On the Revenue screen, select Export CSV in the top bar. The file holds every payment of the current view: the selected date range, the filters and the kind filter (All, New, Renewals, One-time or Refunds), across all pages of the table, oldest first. A range with more than 50,000 payments is cut to the latest 50,000. The button is disabled when the selected range and filters hold no payments. The file is namedpayments-<domain>-<from>-to-<to>.csv, is UTF-8 with a byte order mark so spreadsheet apps read it correctly, and has these columns:
The
amount column always divides by 100. For currencies without minor units, such as JPY, multiply it by 100 to get the amount in the currency’s own units.=, +, -, @, a tab or a carriage return) is prefixed with an apostrophe.
Next steps
How attribution works
First-touch rules and the Revenue screen.
Payment API
Report one-time payments and refunds yourself.
CSV export
Export other reports from the dashboard.