# Receivable disbursed

Product: PNSL API
Event reference version: 1.0.0 (current)
OpenAPI contract: https://docs.axiym.io/openapi/pnsl-api/events/1.0.0.json
Canonical page: https://docs.axiym.io/pnsl-api/events/1.0.0/receivable/onReceivableDisbursed

[Compact reference](/pnsl-api/events/1.0.0/receivable/onReceivableDisbursed.md)

## POST /webhooks/receivable.disbursed

## 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
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "required": [
          "id",
          "timestamp",
          "type",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time"
          },
          "type": {
            "type": "string",
            "const": "receivable.disbursed"
          },
          "data": {
            "$ref": "#/components/schemas/ReceivableEventData"
          }
        }
      }
    }
  }
}
```

## Responses

### 200

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

## Operation metadata

```json
{
  "tags": [
    "Receivable"
  ],
  "operationId": "onReceivableDisbursed"
}
```

## Referenced definitions

- [`#/components/parameters/WebhookSignature`](#definition-1)
- [`#/components/parameters/WebhookKeyId`](#definition-2)
- [`#/components/parameters/WebhookAlgorithm`](#definition-3)
- [`#/components/schemas/ReceivableEventData`](#definition-4)
- [`#/components/schemas/Decimal`](#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/ReceivableEventData`

```json
{
  "type": "object",
  "description": "All monetary values are decimal strings.",
  "required": [
    "receivableId",
    "clientId",
    "initialPrincipal",
    "currentPrincipal",
    "repaymentAmount",
    "paymentRails",
    "currency",
    "status"
  ],
  "properties": {
    "receivableId": {
      "type": "string",
      "format": "uuid"
    },
    "clientId": {
      "type": "string",
      "format": "uuid"
    },
    "code": {
      "type": "string"
    },
    "issueDate": {
      "type": "string",
      "format": "date-time"
    },
    "initialPrincipal": {
      "$ref": "#/components/schemas/Decimal"
    },
    "currentPrincipal": {
      "$ref": "#/components/schemas/Decimal"
    },
    "repaymentAmount": {
      "$ref": "#/components/schemas/Decimal"
    },
    "paymentRails": {
      "type": "string"
    },
    "currency": {
      "type": "string"
    },
    "status": {
      "type": "string"
    }
  }
}
```

### definition-5

`#/components/schemas/Decimal`

```json
{
  "type": "string",
  "pattern": "^-?\\d+(\\.\\d+)?$",
  "description": "Decimal amount serialized as a JSON string."
}
```
