# Account debited

Sent when a debit has been posted to an account.

Product: Payment API
Event reference version: 0.1.0 (current)
OpenAPI contract: https://docs.axiym.io/openapi/payment-api/events/0.1.0.yaml
Canonical page: https://docs.axiym.io/payment-api/events/0.1.0/account/onAccountDebited

[Compact reference](/payment-api/events/0.1.0/account/onAccountDebited.md)

## POST /webhooks/account.debited

## 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 verify the delivery signature."
}
```

### 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
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "type",
          "data"
        ],
        "properties": {
          "id": {
            "$ref": "#/components/schemas/EventId"
          },
          "timestamp": {
            "$ref": "#/components/schemas/EventTimestamp"
          },
          "type": {
            "type": "string",
            "const": "account.debited"
          },
          "data": {
            "$ref": "#/components/schemas/AccountMovementEventData"
          }
        }
      }
    }
  }
}
```

## Responses

### 200

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

## Operation metadata

```json
{
  "tags": [
    "Account"
  ],
  "operationId": "onAccountDebited"
}
```

## Referenced definitions

- [`#/components/parameters/WebhookSignature`](#definition-1)
- [`#/components/parameters/WebhookKeyId`](#definition-2)
- [`#/components/parameters/WebhookAlgorithm`](#definition-3)
- [`#/components/schemas/EventId`](#definition-4)
- [`#/components/schemas/EventTimestamp`](#definition-5)
- [`#/components/schemas/AccountMovementEventData`](#definition-6)
- [`#/components/schemas/Decimal`](#definition-7)
- [`#/components/schemas/Currency`](#definition-8)

### 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 verify the delivery signature."
}
```

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

```json
{
  "type": "string",
  "format": "uuid",
  "description": "Event ID. Use this for de-duplication.",
  "examples": [
    "f47ac10b-58cc-4372-a567-0e02b2c3d479"
  ]
}
```

### definition-5

`#/components/schemas/EventTimestamp`

```json
{
  "type": "string",
  "format": "date-time",
  "description": "Time Axiym created the event. Formatted in ISO 8601.",
  "examples": [
    "2026-09-07T10:07:30Z"
  ]
}
```

### definition-6

`#/components/schemas/AccountMovementEventData`

```json
{
  "type": "object",
  "description": "Posted credit or debit on an Axiym account accessible to your integration. The event contains the movement amount; retrieve the current account balance with `GET /accounts/{accountId}`.",
  "required": [
    "accountId",
    "amount",
    "currency",
    "occurredAt"
  ],
  "properties": {
    "accountId": {
      "type": "string",
      "format": "uuid",
      "description": "Account identifier (UUID).",
      "examples": [
        "5c0a9d3e-1f2b-4a6c-8e7d-9b3f5a1c2d4e"
      ]
    },
    "amount": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Decimal"
        }
      ],
      "description": "Positive movement amount in the account currency; direction is in the event type.",
      "examples": [
        "1010.00"
      ]
    },
    "currency": {
      "$ref": "#/components/schemas/Currency",
      "description": "Account currency.",
      "examples": [
        "USD"
      ]
    },
    "relatedResourceType": {
      "type": "string",
      "description": "Type of the linked money movement; absent for movements with no linked API resource.",
      "enum": [
        "DEPOSIT",
        "WITHDRAWAL",
        "CONVERSION",
        "PAYOUT"
      ],
      "examples": [
        "PAYOUT"
      ]
    },
    "relatedResourceId": {
      "type": "string",
      "format": "uuid",
      "description": "Identifier of the linked resource, where present.",
      "examples": [
        "c3d65312-6575-43de-b8ae-728d8d0a9371"
      ]
    },
    "occurredAt": {
      "type": "string",
      "format": "date-time",
      "description": "When the movement occurred. Formatted in ISO 8601.",
      "examples": [
        "2026-09-07T20:07:31Z"
      ]
    }
  }
}
```

### definition-7

`#/components/schemas/Decimal`

```json
{
  "type": "string",
  "description": "Decimal number serialized as a string to preserve precision.",
  "examples": [
    "1000.00"
  ]
}
```

### definition-8

`#/components/schemas/Currency`

```json
{
  "type": "string",
  "description": "Currency code — ISO 4217 (e.g. USD, EUR) or a supported digital currency (USDT, USDC).",
  "examples": [
    "USD"
  ]
}
```
