Documentation
Creem webhook reference
In Creem Developers ? Webhooks, create a destination pointing to the site's /api/webhooks/creem/SITE_ID URL. Enable checkout.completed, subscription.paid and refund.created, and save the endpoint signing secret in AnalyticFast's Revenue settings. Secrets are encrypted at rest.
The creem-signature header is a hexadecimal HMAC-SHA256 of the exact raw body, keyed by the webhook secret. Creem signs no timestamp. Duplicate delivery and manual resends are deduplicated by the provider's transaction ID, rather than the webhook event ID. Official webhook contract.
Checkout payments use order.transaction as the financial identity and order.amount_paid as integer minor units including tax and discounts. Subscription payments use last_transaction.id and last_transaction.amount_paid. Both events can describe the initial charge, so they share one revenue row. subscription.paid fires for both first payment and renewals: repeat payments are recognized through the same customer in attribution, not by assuming every subscription event is a renewal. The customer comes from the subscription; last_transaction.customer can be null. Currencies remain separate. Free, unpaid and unrelated lifecycle events do not create sales.
Successful refund.created events use the refund's own ID, refund_amount and refund_currency, linked to transaction.id. Partial refunds and refunds arriving before the payment use the existing refund ledger and are capped at the original transaction amount. Pending refunds are ignored.
Attribution
Create checkouts on your server with metadata.ml_visitor_id and metadata.ml_session_id, copied from window.analyticfast.attribution(). Checkout and subscription metadata are read as attribution signals; refund metadata inherits the original payment. Existing datafast_visitor_id and datafast_session_id keys also work. The product ID can be filtered per site.
Creem hosted payment links support metadata[key] query parameters. Add the exact merchant link to the tracker's data-checkouts attribute to tag it automatically:
<script defer data-website-id="SITE_ID"
data-checkouts="https://creem.io/payment/prod_YOUR_PRODUCT"
src="https://YOUR-ANALYTICFAST-HOST/js/script.js"></script>
The tracker preserves existing metadata and tags only allowlisted origin/path pairs. It adds metadata[ml_visitor_id] and metadata[ml_session_id]. Creem processes these server-side; they may disappear from the final checkout URL while remaining in webhook metadata. Official payment link parameters.
The in-app Send test event action previews parsing locally; it never records revenue. Use Creem test mode for signed end-to-end webhook tests.