# Conversion canceled

Sent when a conversion has been canceled, expired, or failed and will not complete.

Product: Direct Trade API
Event reference version: 0.1.0 (current)
OpenAPI contract: https://docs.axiym.io/openapi/direct-trade-api/events/0.1.0.yaml
Canonical page: https://docs.axiym.io/direct-trade-api/events/0.1.0/conversion/onConversionCanceled

[Compact reference](/direct-trade-api/events/0.1.0/conversion/onConversionCanceled.md)

## POST /webhooks/conversion.canceled

## Authentication

```json
{
  "security": [],
  "securitySchemes": {}
}
```

## Parameters

### header: X-Signature

```json
{
  "name": "X-Signature",
  "in": "header",
  "required": true,
  "schema": {
    "type": "string"
  },
  "description": "Ed25519 signature of the raw request body."
}
```

### header: X-Key-Id

```json
{
  "name": "X-Key-Id",
  "in": "header",
  "required": true,
  "schema": {
    "type": "string",
    "format": "uuid"
  },
  "description": "Identifier of the public key used to sign the delivery."
}
```

### header: X-Algorithm

```json
{
  "name": "X-Algorithm",
  "in": "header",
  "required": true,
  "schema": {
    "type": "string",
    "const": "Ed25519"
  },
  "description": "Signature algorithm used for the delivery."
}
```

## Request body

```json
{
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "type",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Event ID. Use this for de-duplication.",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Event timestamp. Formatted in ISO 8601.",
            "examples": [
              "2026-07-14T20:08:00Z"
            ]
          },
          "type": {
            "type": "string",
            "const": "conversion.canceled"
          },
          "data": {
            "$ref": "#/components/schemas/ConversionEventData"
          }
        }
      }
    }
  }
}
```

## Responses

### 200

```json
{
  "description": "Acknowledged by your endpoint."
}
```

## Operation metadata

```json
{
  "tags": [
    "Conversion"
  ],
  "operationId": "onConversionCanceled"
}
```

## Referenced definitions

- [`#/components/parameters/WebhookSignature`](#definition-1)
- [`#/components/parameters/WebhookKeyId`](#definition-2)
- [`#/components/parameters/WebhookAlgorithm`](#definition-3)
- [`#/components/schemas/ConversionEventData`](#definition-4)
- [`#/components/schemas/ConversionStatus`](#definition-5)
- [`#/components/schemas/ExternalReference`](#definition-6)

### definition-1

`#/components/parameters/WebhookSignature`

```json
{
  "name": "X-Signature",
  "in": "header",
  "required": true,
  "schema": {
    "type": "string"
  },
  "description": "Ed25519 signature of the raw request body."
}
```

### definition-2

`#/components/parameters/WebhookKeyId`

```json
{
  "name": "X-Key-Id",
  "in": "header",
  "required": true,
  "schema": {
    "type": "string",
    "format": "uuid"
  },
  "description": "Identifier of the public key used to sign the delivery."
}
```

### definition-3

`#/components/parameters/WebhookAlgorithm`

```json
{
  "name": "X-Algorithm",
  "in": "header",
  "required": true,
  "schema": {
    "type": "string",
    "const": "Ed25519"
  },
  "description": "Signature algorithm used for the delivery."
}
```

### definition-4

`#/components/schemas/ConversionEventData`

```json
{
  "type": "object",
  "description": "Compact event payload: enough to route the event and correlate it with your records. Fetch the authoritative conversion via `GET /conversions/{conversionId}` when you need amounts or the rate.",
  "required": [
    "conversionId",
    "status"
  ],
  "properties": {
    "conversionId": {
      "type": "string",
      "format": "uuid",
      "description": "Conversion identifier (UUID).",
      "examples": [
        "a3f5d7c9-1e2b-4c6a-8d9f-0b1a2c3d4e5f"
      ]
    },
    "status": {
      "$ref": "#/components/schemas/ConversionStatus",
      "description": "Conversion status at the time the event was emitted.",
      "examples": [
        "COMPLETED"
      ]
    },
    "externalReference": {
      "$ref": "#/components/schemas/ExternalReference",
      "description": "Your reference submitted on creation, where present.",
      "examples": [
        "conv-2026-0714-01"
      ]
    },
    "reasonCode": {
      "type": "string",
      "description": "Present on `conversion.canceled` — the reason as reported by operations or the liquidity venue. Example: `RATE_EXPIRED`."
    }
  }
}
```

### definition-5

`#/components/schemas/ConversionStatus`

```json
{
  "type": "string",
  "description": "`PENDING` after creation (awaiting confirmation at the locked rate), `ACTIVE` once confirmed (executing), `COMPLETED` when the funds are exchanged, `CANCELED` if canceled, expired, or failed (see `reasonCode`).\n",
  "enum": [
    "PENDING",
    "ACTIVE",
    "COMPLETED",
    "CANCELED"
  ],
  "examples": [
    "COMPLETED"
  ]
}
```

### definition-6

`#/components/schemas/ExternalReference`

```json
{
  "type": "string",
  "maxLength": 255,
  "description": "Your own identifier for this object, for correlation with your system. Optional, echoed back on reads.\n",
  "examples": [
    "wd-2026-0714-01"
  ]
}
```
