# commission.created

> The ByDomu commission.created event (Commission created): when it fires, how to subscribe, its fields and the payload delivered by webhook.


Commission created

Object · commission Includes · deal Instant

## When it fires

The commission of a won deal was generated. Carries the commission, the deal and its contact.

Instantly, when it happens in ByDomu: from the app, the API, Noa, an automation or an integration. `actor.kind` tells you who: USER, NOA, SYSTEM, API, AUTOMATION or INTEGRATION.

## Subscribe with

- `commission.created` Only this event
- `commission.*` Every event of Commission
- `*` The whole catalog

## Fields it carries

paths for filters and templates

`commission.id` Commission id

`commission.referenceNumber` Reference number

`commission.status` Commission status

`commission.grossAmount` Gross amount

`commission.netAmount` Net amount

`commission.currency` Currency

`commission.dealId` Opportunity

`deal.id` Opportunity id

`deal.code` Opportunity code

`deal.title` Opportunity title

`deal.value` Value

`deal.currency` Currency

`deal.probability` Probability

`deal.status` Status

`deal.intent` Intent

`deal.leadSource` Lead source

`deal.agentId` Agent

`deal.contactId` Contact

`deal.pipelineId` Pipeline

`deal.stageId` Stage id

`deal.stageName` Stage

`deal.previousStageId` Previous stage id

`deal.previousStageName` Previous stage

`deal.lostReason` Lost reason

`deal.aiCreated` Created by Noa

`deal.saasPlanId`

`deal.saasMrrAmount`

`deal.trialStartedAt`

`deal.trialEndsAt`

Up to 5 attempts (0 s, 5 s, 30 s, 2 min and 10 min) on network errors, 429 or 5xx. Reply 2xx in under 10 s.

Payload:

```
{
  "event": "commission.created",
  "id": "5f3a0c1e-7d2b-4f7e-9a51-0b6c1d2e3f40",
  "type": "commission.created",
  "timestamp": "2026-09-22T14:30:00.000Z",
  "organizationId": "clx1org001",
  "actor": {
    "kind": "SYSTEM",
    "userId": null
  },
  "data": {
    "commission": {
      "id": "clx1com001",
      "referenceNumber": "COM-2026-0012",
      "status": "PENDIENTE",
      "type": "PERCENTAGE",
      "grossAmount": 13500000,
      "netAmount": 11340000,
      "paidAmount": 0,
      "currency": "COP",
      "dealId": "clx1deal001",
      "closedAt": "2026-09-22T14:30:00.000Z"
    },
    "deal": {
      "id": "clx1deal001",
      "code": "N-0042",
      "title": "Compra apartamento Chapinero · Laura Restrepo",
      "value": 450000000,
      "currency": "COP",
      "probability": 100,
      "status": "WON",
      "intent": "PURCHASE",
      "leadSource": "PORTAL",
      "lostReason": null,
      "aiCreated": false,
      "agentId": "clx1usr001",
      "contactId": "clx1con001",
      "pipelineId": "clx1pip001",
      "stageId": "clx1stg005",
      "stageName": "Ganado",
      "stageEnteredAt": "2026-09-22T14:30:00.000Z",
      "expectedCloseDate": "2026-10-31T00:00:00.000Z",
      "closedAt": "2026-09-22T14:30:00.000Z",
      "createdAt": "2026-09-20T15:05:00.000Z",
      "saasPlanId": null,
      "saasPlanName": null,
      "saasBillingPeriod": null,
      "saasMrrAmount": null,
      "trialStartedAt": null,
      "trialEndsAt": null
    },
    "contact": {
      "id": "clx1con001",
      "code": "C-0042",
      "firstName": "Laura",
      "lastName": "Restrepo",
      "fullName": "Laura Restrepo",
      "email": "laura.restrepo@example.com",
      "phone": "+573000000001",
      "source": "WEBSITE",
      "status": "QUALIFIED",
      "type": "CLIENT",
      "score": 72,
      "ownerId": "clx1usr001",
      "preferredCity": "Bogotá",
      "preferredType": "APARTMENT",
      "budget": 450000000,
      "currency": "COP",
      "tags": [
        "Compra",
        "Chapinero"
      ],
      "createdAt": "2026-09-20T15:04:00.000Z"
    }
  }
}
```

Headers:

```
X-Domu-Event: commission.created
X-Domu-Signature: t=1790610130,v1=9c1e…
User-Agent: Domu-Webhooks/2
```

Verify signature:

```
import { createHmac, timingSafeEqual } from "node:crypto";

// header = X-Domu-Signature: t=<timestamp>,v1=<hmac>
function verifyWebhook(rawBody, header, secret, toleranceSec = 300) {
  const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
  const timestamp = Number(parts.t);
  if (!timestamp || !parts.v1) return false;
  if (Math.abs(Date.now() / 1000 - timestamp) > toleranceSec) return false;
  const expected = createHmac("sha256", secret)
    .update(`${timestamp}.${rawBody}`)
    .digest("hex");
  const a = Buffer.from(expected);
  const b = Buffer.from(parts.v1);
  return a.length === b.length && timingSafeEqual(a, b);
}
```

**Get it with your test data** GET /v1/webhooks/sample/commission.created

[Try it](https://developers.bydomu.com/en/referencia/get-webhook-sample?probar=1&type=commission.created)
