Stripe webhook setup

The four events Traaaction needs, where to get your endpoint URL, and how to verify it works.

Without the webhook, Traaaction never hears about your sales — no commissions, no clawbacks, nothing. Setup takes 5 minutes.

1. Get your endpoint URL

  1. In Traaaction: Dashboard → Developer → Webhooks.
  2. Copy the endpoint URL (one per workspace). It looks like:
https://www.traaaction.com/api/webhooks/{endpointId}

Also copy the signing secret shown below it — you'll paste it into Stripe.

2. Add it in Stripe

  1. In Stripe: Developers → Webhooks → Add endpoint.
  2. Paste the Traaaction endpoint URL.
  3. Select these four events:
EventWhat it does
checkout.session.completedCreates the first commission (SALE, or RECURRING month 1).
invoice.paidCreates recurring commissions for months 2+.
charge.refundedClawback — deletes or reverses the commission.
customer.subscription.deletedRemoves pending commissions on cancellation.
  1. Important: Stripe shows you its own signing secret (whsec_...). Copy it back into Traaaction so we can verify signatures.

3. Pass the click ID in Checkout

Every Checkout session must carry tracClickId in metadata. Without it, Traaaction can't attribute the sale.

const session = await stripe.checkout.sessions.create({
  mode: "subscription",
  line_items: [...],
  success_url: "...",
  metadata: {
    tracClickId: cookies.get("trac_click_id"),
  },
})

Our SDKs (traaaction on npm and PyPI) ship a getClickId(request) helper that reads the cookie for you — see SDKs and REST API.

4. Verify it works

  • In Stripe: fire a test event from the webhook page. You should see 200 OK.
  • In Traaaction: the commission shows up in Dashboard → Commissions within 1–2 seconds.
  • No commission? Check the event log in Dashboard → Developer → Webhooks → Logs. Missing tracClickId, invalid signature, or a zero/negative amount will show as "skipped" with a reason.

Security

Every event is verified with your Stripe signing secret via HMAC. Anything that fails verification is dropped. Secrets are stored encrypted and are workspace-scoped, so a leak in one workspace can't affect another.

Related

Updated 2026-04-19
Stripe webhook setup — Traaaction Help Center | Traaaction