All docs pages

Billing

Creem

Connect Creem: what to pass at checkout, which webhook events, and where the signing secret is.

1. Pass the referral at checkout

const ref = window.referralmeter?.ref() ?? null;

// Server, when creating the checkout session (POST /v1/checkouts):
metadata: { referralmeter_ref: ref ?? "" },

Referralmeter reads referralmeter_ref from that field on the payment Creem sends back. To mark a purchase as credits or a top-up (so your credits rule applies), also set kind: "credits" in the same metadata.

2. Connect the webhook

Creem → Developers → Webhooks → Add webhook. URL: the Creem webhook URL from Billing connections. Copy the signing secret into Billing connections.

Copy the webhook secret from Creem → Developers → Webhooks. Referralmeter checks the creem-signature header against it.

Events Referralmeter uses:

  • checkout.completed
  • subscription.paid
  • refund.created
  • dispute.created
  • subscription.canceled
  • subscription.expired

Test mode

Creem marks test-mode events; they are recorded and never paid out.