> ## Documentation Index
> Fetch the complete documentation index at: https://klipy.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# deal.closed

> Klipy sends no separate deal.closed webhook type. Deal-close notifications arrive as deal.moved; detect a close from data.newStageId.

# `deal.closed`

## What this event means

Klipy never sends a webhook with `type: "deal.closed"`. Closing a deal moves it into the pipeline's Closed Won or Closed Lost stage, which fires the same internal `deal.stage_changed` event as any other stage move. That event reaches your endpoint as `type: "deal.moved"`. Detect a close by inspecting `data.newStageId` on that event.

## Webhook `type`

There is no `deal.closed` type. Deal-close notifications use `deal.moved` — see [`deal.moved`](https://klipy.ai/docs/developers/webhooks/deal-moved) for the complete payload reference.

## How to detect a close inside `deal.moved`

| Field | Value on close | Notes |
| - | - | - |
| `data.newStageId` | `CLOSED_WON` or `CLOSED_LOST` | Sentinel stage id Klipy uses for a pipeline's closing stages. Filter on this field. |
| `data.newStageName` | The pipeline's label for that stage (falls back to "Closed Won" / "Closed Lost") | Display text only — do not filter on it, since pipelines can rename this label. |
| `data.from` / `data.to` | Previous stage name / new stage name | Human-readable transition context. |

## Internal source mapping

| Internal event | Trigger path |
| - | - |
| `deal.stage_changed` | A deal's stage is updated through the deal-update path, including moves into the `CLOSED_WON` or `CLOSED_LOST` sentinel stage. |

## Payload example

```json theme={null}
{
  "type": "deal.moved",
  "object": "event",
  "data": {
    "actor_name": "Alex Morgan",
    "deal_id": "dl_1a2b3c",
    "pipelineId": "pl_b4c5d6",
    "pipeline_id": "pl_b4c5d6",
    "pipeline": "Q4 Pipeline",
    "estimated_value": 18500,
    "currency": "USD",
    "deal_creation_date": "2026-03-13T09:21:11.122Z",
    "estimated_close_date": "2026-06-01T00:00:00.000Z",
    "is_private": false,
    "deal_name": "Acme Analytics - Expansion plan",
    "owner_name": "Alex Morgan",
    "from": "Proposal",
    "to": "Closed Won",
    "previousStageId": "st_proposal",
    "newStageId": "CLOSED_WON",
    "previousStageName": "Proposal",
    "newStageName": "Closed Won",
    "company": {
      "name": "Acme Analytics",
      "domain": "acmeanalytics.com"
    },
    "point_of_contact": {
      "first_name": "Jordan",
      "last_name": "Patel",
      "email": "jordan.patel@acmeanalytics.com",
      "title": "Head of Growth"
    }
  }
}
```

There is no `won` field, `cycle_length` field, or `days_diff_from_estimate` field in this payload. Derive the outcome from `data.newStageId` instead.

## Delivery and idempotency handling

* Use `data.deal_id` for dedupe and as the immutable entity reference.
* Detect a close by checking whether `data.newStageId` equals `CLOSED_WON` or `CLOSED_LOST` — Klipy does not send a distinct event type for this.
* If your system needs closed-at timing, store your own timestamp when you first receive the event. See [Webhook delivery, errors, and retries](https://klipy.ai/docs/developers/webhooks/fixes-errors-retries.md) for retry behavior.

## Related links

* [`deal.moved`](https://klipy.ai/docs/developers/webhooks/deal-moved) — full payload reference for the event that carries deal-close notifications.
* [Webhook introduction](https://klipy.ai/docs/developers/webhooks/introduction.md)
* [Webhook event types](https://klipy.ai/docs/developers/webhooks/event-types.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.