# Deposit created

Sent when an incoming payment has been detected and recorded as a deposit.

Product: Client Trade API
Event reference version: 0.2.0 (current)
OpenAPI contract: https://docs.axiym.io/openapi/trade-api/events/0.2.0.yaml
Canonical page: https://docs.axiym.io/trade-api/events/0.2.0/deposit/onDepositCreated

[Compact reference](/trade-api/events/0.2.0/deposit/onDepositCreated.md)

## POST /webhooks/deposit.created

## 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": "deposit.created"
          },
          "data": {
            "$ref": "#/components/schemas/DepositEventData"
          }
        }
      }
    }
  }
}
```

## Responses

### 200

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

## Operation metadata

```json
{
  "tags": [
    "Deposit"
  ],
  "operationId": "onDepositCreated"
}
```

## Referenced definitions

- [`#/components/parameters/WebhookSignature`](#definition-1)
- [`#/components/parameters/WebhookKeyId`](#definition-2)
- [`#/components/parameters/WebhookAlgorithm`](#definition-3)
- [`#/components/schemas/DepositEventData`](#definition-4)
- [`#/components/schemas/DepositStatus`](#definition-5)

### 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/DepositEventData`

```json
{
  "type": "object",
  "description": "Compact event payload: enough to route the event and correlate it with your records. Fetch the authoritative deposit via `GET /clients/{clientId}/deposits/{depositId}` when you need amounts or the transaction hash.",
  "required": [
    "depositId",
    "status",
    "clientId"
  ],
  "properties": {
    "depositId": {
      "type": "string",
      "format": "uuid",
      "description": "Deposit identifier (UUID).",
      "examples": [
        "4c8e2b6a-1d9f-4e3b-a7c5-2f0a8d6b4e1c"
      ]
    },
    "status": {
      "$ref": "#/components/schemas/DepositStatus",
      "description": "Deposit status at the time the event was emitted.",
      "examples": [
        "COMPLETED"
      ]
    },
    "reasonCode": {
      "type": "string",
      "description": "Present on `deposit.canceled` / `deposit.rejected` — the reason as reported by the bank, the network, or Axiym operations. Example: `SENDER_SCREENING_FAILED`."
    },
    "clientId": {
      "type": "string",
      "format": "uuid",
      "description": "Axiym identifier of the client that owns the resource.",
      "examples": [
        "1d2f7f5e-8a3b-4c6d-9e0f-2a4b6c8d0e2f"
      ]
    }
  }
}
```

### definition-5

`#/components/schemas/DepositStatus`

```json
{
  "type": "string",
  "description": "`PENDING` detected and awaiting crediting, `HELD` temporarily on hold — no action needed from you, `COMPLETED` credited to the account, `CANCELED`/`REJECTED` not completed (see `reasonCode`).\n",
  "enum": [
    "PENDING",
    "HELD",
    "COMPLETED",
    "CANCELED",
    "REJECTED"
  ],
  "examples": [
    "COMPLETED"
  ]
}
```
