Traaaction creates and clawbacks commissions based on Stripe events. You need to forward four of them to the endpoint we give you in Dashboard → Developer.
Required events
| Event | Role |
|-------|------|
| checkout.session.completed | First commission: SALE or RECURRING month 1. |
| invoice.paid | Recurring commissions for months 2+. |
| charge.refunded | Clawback (dual strategy: session + invoice). |
| customer.subscription.deleted | Remove pending recurring commissions. |
Required metadata
Every Checkout session must include tracClickId in metadata. Without it, Traaaction cannot attribute the sale and the webhook will skip commission creation.
await stripe.checkout.sessions.create({
mode: "subscription",
metadata: { tracClickId: cookies.trac_click_id },
// ...rest
})
Verify it's working
Send a test event from the Stripe dashboard. You should see the request succeed with a 200 in Stripe's webhook logs. The commission shows up in Dashboard → Commissions within a second or two.
Security
Every webhook is verified with your per-workspace Stripe signing secret. Reject any event that fails HMAC verification.