# Fund a Payment

Product: PNSL API
API reference version: 2.0.0 (current)
OpenAPI contract: https://docs.axiym.io/openapi/pnsl-api/2.0.0.json
Canonical page: https://docs.axiym.io/pnsl-api/api-reference/2.0.0/receivables/fundPayment

[Compact reference](/pnsl-api/api-reference/2.0.0/receivables/fundPayment.md)

## POST /clients/{clientId}/receivables

## Servers

```json
[
  {
    "url": "https://partner-api.sandbox.axiym.io/api/v1",
    "description": "Sandbox"
  },
  {
    "url": "https://partner-api.axiym.io/api/v1",
    "description": "Production"
  }
]
```

## Authentication

```json
{
  "security": [
    {
      "Default": []
    }
  ],
  "securitySchemes": {
    "Default": {
      "type": "http",
      "scheme": "bearer",
      "bearerFormat": "JWT"
    }
  }
}
```

## Parameters

### path: clientId

```json
{
  "name": "clientId",
  "in": "path",
  "description": "Client identifier (UUID).",
  "required": true,
  "schema": {
    "type": "string",
    "format": "uuid",
    "examples": [
      "b7e8c1a2-9f43-4d2e-8a6b-1c2d3e4f5a6b"
    ]
  }
}
```

### header: X-Request-Id

```json
{
  "name": "X-Request-Id",
  "in": "header",
  "required": false,
  "description": "Client-generated unique id for this request (UUID recommended), used for end-to-end tracing. Echoed back in the `X-Request-Id` response header and recorded in Axiym logs — quote it when contacting support. If omitted, Axiym generates one.\n",
  "schema": {
    "type": "string",
    "format": "uuid",
    "examples": [
      "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    ]
  }
}
```

### header: Idempotency-Key

```json
{
  "name": "Idempotency-Key",
  "in": "header",
  "required": false,
  "description": "Unique client-generated key to safely retry a funds-moving request (e.g. a UUID, but any unique string works). Repeating a request with the same key returns the original result instead of creating a duplicate.",
  "schema": {
    "type": "string",
    "maxLength": 255,
    "examples": [
      "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
    ]
  }
}
```

## Request body

```json
{
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "currency": {
            "$ref": "#/components/schemas/Currency",
            "example": "USD"
          },
          "amount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Decimal"
              }
            ],
            "description": "Transaction amount",
            "example": "1000"
          },
          "paymentTransaction": {
            "type": "object",
            "properties": {
              "paymentId": {
                "type": "string",
                "description": "Payment ID",
                "example": "TX-001"
              },
              "timestamp": {
                "type": "string",
                "format": "date-time",
                "description": "Payment Timestamp",
                "example": "2026-05-11T10:00:00Z"
              },
              "data": {
                "type": "object",
                "properties": {},
                "description": "Payment Raw Data"
              }
            },
            "required": [
              "paymentId",
              "timestamp",
              "data"
            ]
          },
          "paymentRails": {
            "type": "string",
            "description": "Payment Rail Code",
            "example": "ZENUS_BANK"
          }
        },
        "required": [
          "amount",
          "currency",
          "paymentTransaction"
        ]
      }
    }
  }
}
```

## Responses

### 201

```json
{
  "description": "",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/Receivable"
      }
    }
  },
  "headers": {}
}
```

### 400

```json
{
  "description": "",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "HTTP status code, duplicated in the body."
          },
          "message": {
            "type": "string",
            "description": "Human-readable message describing the error."
          },
          "errors": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "message": {
                "type": "string"
              }
            },
            "description": "Additional error details; null when there are none."
          }
        },
        "required": [
          "code",
          "message",
          "errors"
        ]
      },
      "examples": {
        "Malformed JSON body": {
          "summary": "Malformed JSON body",
          "value": {
            "code": 400,
            "message": "Bad Request",
            "errors": {
              "message": "Failed to parse the request body as JSON: expected value at line 1 column 5"
            }
          }
        },
        "Generic": {
          "summary": "Generic",
          "value": {
            "code": 400,
            "message": "Invalid cursor",
            "errors": null
          }
        }
      }
    }
  },
  "headers": {
    "X-Request-Id": {
      "description": "Unique id of this request (echoed from the request, or generated when omitted). Recorded in Axiym logs — quote it when contacting support about a failed request.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "examples": [
          "3fa85f64-5717-4562-b3fc-2c963f66afa6"
        ]
      }
    }
  }
}
```

### 401

```json
{
  "description": "",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "HTTP status code, duplicated in the body."
          },
          "message": {
            "type": "string",
            "description": "Human-readable message describing the error."
          },
          "errors": {
            "type": [
              "object",
              "null"
            ],
            "description": "Additional error details; null when there are none."
          }
        },
        "required": [
          "code",
          "message",
          "errors"
        ]
      },
      "examples": {
        "Example 1": {
          "summary": "Example 1",
          "value": {
            "code": 401,
            "message": "Unauthorized",
            "errors": null
          }
        }
      }
    }
  },
  "headers": {
    "X-Request-Id": {
      "description": "Unique id of this request (echoed from the request, or generated when omitted). Recorded in Axiym logs — quote it when contacting support about a failed request.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "examples": [
          "3fa85f64-5717-4562-b3fc-2c963f66afa6"
        ]
      }
    }
  }
}
```

### 403

```json
{
  "description": "Forbidden",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "HTTP status code, duplicated in the body."
          },
          "message": {
            "type": "string",
            "description": "Human-readable message describing the error."
          },
          "errors": {
            "type": [
              "object",
              "null"
            ],
            "description": "Additional error details; null when there are none."
          }
        },
        "required": [
          "code",
          "message",
          "errors"
        ]
      },
      "examples": {
        "Example 1": {
          "summary": "Example 1",
          "value": {
            "code": 403,
            "message": "Forbidden",
            "errors": null
          }
        }
      }
    }
  },
  "headers": {
    "X-Request-Id": {
      "description": "Unique id of this request (echoed from the request, or generated when omitted). Recorded in Axiym logs — quote it when contacting support about a failed request.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "examples": [
          "3fa85f64-5717-4562-b3fc-2c963f66afa6"
        ]
      }
    }
  }
}
```

### 404

```json
{
  "description": "",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "HTTP status code, duplicated in the body."
          },
          "message": {
            "type": "string",
            "description": "Human-readable message: either the generic 'Not Found' or a domain-specific one such as 'Client Not Found'."
          },
          "errors": {
            "type": [
              "object",
              "null"
            ],
            "description": "Additional error details; null when there are none."
          }
        },
        "required": [
          "code",
          "message",
          "errors"
        ]
      },
      "examples": {
        "Generic": {
          "summary": "Generic",
          "value": {
            "code": 404,
            "message": "Not Found",
            "errors": null
          }
        },
        "Client not found": {
          "summary": "Client not found",
          "value": {
            "code": 404,
            "message": "Client Not Found",
            "errors": null
          }
        }
      }
    }
  },
  "headers": {
    "X-Request-Id": {
      "description": "Unique id of this request (echoed from the request, or generated when omitted). Recorded in Axiym logs — quote it when contacting support about a failed request.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "examples": [
          "3fa85f64-5717-4562-b3fc-2c963f66afa6"
        ]
      }
    }
  }
}
```

### 422

```json
{
  "description": "",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "HTTP status code, duplicated in the body."
          },
          "message": {
            "type": "string",
            "description": "`Invalid Parameters` for validation failures; the rejection reason otherwise."
          },
          "errors": {
            "type": [
              "object",
              "null"
            ],
            "description": "Validation failures: object keyed by field name (camelCase); each value is either an array of ValidationError records (leaf), a nested object for struct fields, or an object keyed by array index for list fields. Business rejections: null.",
            "additionalProperties": {
              "$ref": "#/components/schemas/ValidationFieldErrors"
            }
          }
        },
        "required": [
          "code",
          "message",
          "errors"
        ]
      },
      "examples": {
        "Flat field errors": {
          "summary": "Flat field errors",
          "value": {
            "code": 422,
            "message": "Invalid Parameters",
            "errors": {
              "legalEntityName": [
                {
                  "code": "length",
                  "message": null,
                  "params": {
                    "value": "",
                    "min": 1
                  }
                }
              ],
              "currency": [
                {
                  "code": "invalid_currency",
                  "message": null,
                  "params": {
                    "value": "ZZZ"
                  }
                }
              ]
            }
          }
        },
        "Nested struct errors": {
          "summary": "Nested struct errors",
          "value": {
            "code": 422,
            "message": "Invalid Parameters",
            "errors": {
              "legalAddress": {
                "country": [
                  {
                    "code": "invalid_country",
                    "message": null,
                    "params": {
                      "value": "INVALID"
                    }
                  }
                ],
                "postalCode": [
                  {
                    "code": "length",
                    "message": null,
                    "params": {
                      "value": "",
                      "min": 1
                    }
                  }
                ]
              }
            }
          }
        },
        "List item errors": {
          "summary": "List item errors",
          "value": {
            "code": 422,
            "message": "Invalid Parameters",
            "errors": {
              "transactionHistory": {
                "0": {
                  "timestamp": [
                    {
                      "code": "invalid_date_time",
                      "message": null,
                      "params": {
                        "value": "2026-04-14"
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "Custom validator": {
          "summary": "Custom validator",
          "value": {
            "code": 422,
            "message": "Invalid Parameters",
            "errors": {
              "disbursementAccount": [
                {
                  "code": "disbursement_account_required",
                  "message": null,
                  "params": {
                    "value": null
                  }
                }
              ]
            }
          }
        },
        "Business rejection": {
          "summary": "Business rejection",
          "value": {
            "code": 422,
            "message": "Documents Not Accepted",
            "errors": null
          }
        },
        "Onboarding cannot be finished": {
          "summary": "Onboarding cannot be finished",
          "value": {
            "code": 422,
            "message": "Onboarding Cannot Be Finished",
            "errors": null
          }
        }
      }
    }
  },
  "headers": {
    "X-Request-Id": {
      "description": "Unique id of this request (echoed from the request, or generated when omitted). Recorded in Axiym logs — quote it when contacting support about a failed request.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "examples": [
          "3fa85f64-5717-4562-b3fc-2c963f66afa6"
        ]
      }
    }
  }
}
```

### 500

```json
{
  "description": "",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "HTTP status code, duplicated in the body."
          },
          "message": {
            "type": "string",
            "description": "Human-readable message describing the error."
          },
          "errors": {
            "type": [
              "object",
              "null"
            ],
            "description": "Additional error details; null when there are none."
          }
        },
        "required": [
          "code",
          "message",
          "errors"
        ]
      },
      "examples": {
        "Example 1": {
          "summary": "Example 1",
          "value": {
            "code": 500,
            "message": "Internal Error",
            "errors": null
          }
        }
      }
    }
  },
  "headers": {
    "X-Request-Id": {
      "description": "Unique id of this request (echoed from the request, or generated when omitted). Recorded in Axiym logs — quote it when contacting support about a failed request.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "examples": [
          "3fa85f64-5717-4562-b3fc-2c963f66afa6"
        ]
      }
    }
  }
}
```

## Operation metadata

```json
{
  "operationId": "fundPayment",
  "tags": [
    "Receivables"
  ]
}
```

## Referenced definitions

- [`#/components/parameters/RequestId`](#definition-1)
- [`#/components/parameters/IdempotencyKey`](#definition-2)
- [`#/components/schemas/Currency`](#definition-3)
- [`#/components/schemas/Decimal`](#definition-4)
- [`#/components/schemas/Receivable`](#definition-5)
- [`#/components/schemas/ReceivableStatus`](#definition-6)
- [`#/components/schemas/TransactionRef`](#definition-7)
- [`#/components/responses/BadRequest`](#definition-8)
- [`#/components/responses/Unauthorized`](#definition-9)
- [`#/components/responses/Forbidden`](#definition-10)
- [`#/components/responses/NotFound`](#definition-11)
- [`#/components/responses/InvalidParams`](#definition-12)
- [`#/components/schemas/ValidationFieldErrors`](#definition-13)
- [`#/components/schemas/ValidationError`](#definition-14)
- [`#/components/responses/InternalError`](#definition-15)

### definition-1

`#/components/parameters/RequestId`

```json
{
  "name": "X-Request-Id",
  "in": "header",
  "required": false,
  "description": "Client-generated unique id for this request (UUID recommended), used for end-to-end tracing. Echoed back in the `X-Request-Id` response header and recorded in Axiym logs — quote it when contacting support. If omitted, Axiym generates one.\n",
  "schema": {
    "type": "string",
    "format": "uuid",
    "examples": [
      "3fa85f64-5717-4562-b3fc-2c963f66afa6"
    ]
  }
}
```

### definition-2

`#/components/parameters/IdempotencyKey`

```json
{
  "name": "Idempotency-Key",
  "in": "header",
  "required": false,
  "description": "Unique client-generated key to safely retry a funds-moving request (e.g. a UUID, but any unique string works). Repeating a request with the same key returns the original result instead of creating a duplicate.",
  "schema": {
    "type": "string",
    "maxLength": 255,
    "examples": [
      "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
    ]
  }
}
```

### definition-3

`#/components/schemas/Currency`

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

### definition-4

`#/components/schemas/Decimal`

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

### definition-5

`#/components/schemas/Receivable`

```json
{
  "type": "object",
  "properties": {
    "receivableId": {
      "type": "string",
      "description": "Receivable identifier (UUID).",
      "examples": [
        "e5a9c3d1-7b2f-4a8e-9c1d-3f6b8a0e2c4d"
      ]
    },
    "clientId": {
      "type": "string",
      "format": "uuid",
      "description": "Client identifier (UUID).",
      "examples": [
        "b7e8c1a2-9f43-4d2e-8a6b-1c2d3e4f5a6b"
      ]
    },
    "issueDate": {
      "type": "string",
      "format": "date-time",
      "description": "Issue Date. Formatted in ISO 8601",
      "examples": [
        "2026-06-23T14:05:09Z"
      ]
    },
    "initialPrincipal": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Decimal"
        }
      ],
      "description": "Original loan amount at the start"
    },
    "currentPrincipal": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Decimal"
        }
      ],
      "description": "Remaining unpaid principal"
    },
    "repaymentAmount": {
      "allOf": [
        {
          "$ref": "#/components/schemas/Decimal"
        }
      ],
      "description": "Total due including interest and fees"
    },
    "currency": {
      "$ref": "#/components/schemas/Currency",
      "description": "Currency code (ISO 4217 fiat or supported stablecoin).",
      "examples": [
        "USD"
      ]
    },
    "status": {
      "allOf": [
        {
          "$ref": "#/components/schemas/ReceivableStatus"
        }
      ],
      "description": "Receivable lifecycle status.",
      "examples": [
        "PENDING"
      ]
    },
    "paymentTransaction": {
      "allOf": [
        {
          "$ref": "#/components/schemas/TransactionRef"
        }
      ],
      "description": "Payment Transaction"
    },
    "disbursedTransaction": {
      "allOf": [
        {
          "$ref": "#/components/schemas/TransactionRef"
        }
      ],
      "description": "Disbursed Transaction"
    },
    "repaymentTransactions": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/TransactionRef"
      },
      "description": "Repayment transactions"
    },
    "paymentRails": {
      "type": "string",
      "description": "Payment rail — a configured settlement channel Axiym uses to hold and move funds: a banking partner for fiat (e.g. `ZENUS_BANK`, `FREEMARKET`) or a blockchain network for crypto (e.g. `TRON`, `AVALANCHE`). Codes are returned by `GET /settings/payment-rails`.",
      "examples": [
        "ZENUS_BANK"
      ]
    }
  },
  "required": [
    "receivableId",
    "clientId",
    "issueDate",
    "initialPrincipal",
    "status",
    "currency",
    "currentPrincipal",
    "repaymentAmount",
    "paymentTransaction",
    "paymentRails"
  ]
}
```

### definition-6

`#/components/schemas/ReceivableStatus`

```json
{
  "type": "string",
  "description": "`PENDING` while the funding request is accepted and the disbursement is in progress; `ACTIVE` once the disbursement settled and principal is outstanding (stays `ACTIVE` after a partial repayment); `PAID` when the obligation is fully repaid; `CANCELED` if the receivable did not complete.",
  "enum": [
    "PENDING",
    "ACTIVE",
    "PAID",
    "CANCELED"
  ],
  "examples": [
    "PENDING"
  ]
}
```

### definition-7

`#/components/schemas/TransactionRef`

```json
{
  "type": "object",
  "description": "Reference to a settled transaction.",
  "required": [
    "txId",
    "txTimestamp"
  ],
  "properties": {
    "txId": {
      "type": "string",
      "description": "Transaction ID",
      "examples": [
        "3fa85f64-5717-4562-b3fc-2c963f66afa6"
      ]
    },
    "txTimestamp": {
      "type": "string",
      "format": "date-time",
      "description": "Transaction timestamp (ISO 8601)",
      "examples": [
        "2026-06-23T14:05:09Z"
      ]
    }
  }
}
```

### definition-8

`#/components/responses/BadRequest`

```json
{
  "description": "",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "HTTP status code, duplicated in the body."
          },
          "message": {
            "type": "string",
            "description": "Human-readable message describing the error."
          },
          "errors": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "message": {
                "type": "string"
              }
            },
            "description": "Additional error details; null when there are none."
          }
        },
        "required": [
          "code",
          "message",
          "errors"
        ]
      },
      "examples": {
        "Malformed JSON body": {
          "summary": "Malformed JSON body",
          "value": {
            "code": 400,
            "message": "Bad Request",
            "errors": {
              "message": "Failed to parse the request body as JSON: expected value at line 1 column 5"
            }
          }
        },
        "Generic": {
          "summary": "Generic",
          "value": {
            "code": 400,
            "message": "Invalid cursor",
            "errors": null
          }
        }
      }
    }
  },
  "headers": {
    "X-Request-Id": {
      "description": "Unique id of this request (echoed from the request, or generated when omitted). Recorded in Axiym logs — quote it when contacting support about a failed request.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "examples": [
          "3fa85f64-5717-4562-b3fc-2c963f66afa6"
        ]
      }
    }
  }
}
```

### definition-9

`#/components/responses/Unauthorized`

```json
{
  "description": "",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "HTTP status code, duplicated in the body."
          },
          "message": {
            "type": "string",
            "description": "Human-readable message describing the error."
          },
          "errors": {
            "type": [
              "object",
              "null"
            ],
            "description": "Additional error details; null when there are none."
          }
        },
        "required": [
          "code",
          "message",
          "errors"
        ]
      },
      "examples": {
        "Example 1": {
          "summary": "Example 1",
          "value": {
            "code": 401,
            "message": "Unauthorized",
            "errors": null
          }
        }
      }
    }
  },
  "headers": {
    "X-Request-Id": {
      "description": "Unique id of this request (echoed from the request, or generated when omitted). Recorded in Axiym logs — quote it when contacting support about a failed request.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "examples": [
          "3fa85f64-5717-4562-b3fc-2c963f66afa6"
        ]
      }
    }
  }
}
```

### definition-10

`#/components/responses/Forbidden`

```json
{
  "description": "Forbidden",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "HTTP status code, duplicated in the body."
          },
          "message": {
            "type": "string",
            "description": "Human-readable message describing the error."
          },
          "errors": {
            "type": [
              "object",
              "null"
            ],
            "description": "Additional error details; null when there are none."
          }
        },
        "required": [
          "code",
          "message",
          "errors"
        ]
      },
      "examples": {
        "Example 1": {
          "summary": "Example 1",
          "value": {
            "code": 403,
            "message": "Forbidden",
            "errors": null
          }
        }
      }
    }
  },
  "headers": {
    "X-Request-Id": {
      "description": "Unique id of this request (echoed from the request, or generated when omitted). Recorded in Axiym logs — quote it when contacting support about a failed request.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "examples": [
          "3fa85f64-5717-4562-b3fc-2c963f66afa6"
        ]
      }
    }
  }
}
```

### definition-11

`#/components/responses/NotFound`

```json
{
  "description": "",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "HTTP status code, duplicated in the body."
          },
          "message": {
            "type": "string",
            "description": "Human-readable message: either the generic 'Not Found' or a domain-specific one such as 'Client Not Found'."
          },
          "errors": {
            "type": [
              "object",
              "null"
            ],
            "description": "Additional error details; null when there are none."
          }
        },
        "required": [
          "code",
          "message",
          "errors"
        ]
      },
      "examples": {
        "Generic": {
          "summary": "Generic",
          "value": {
            "code": 404,
            "message": "Not Found",
            "errors": null
          }
        },
        "Client not found": {
          "summary": "Client not found",
          "value": {
            "code": 404,
            "message": "Client Not Found",
            "errors": null
          }
        }
      }
    }
  },
  "headers": {
    "X-Request-Id": {
      "description": "Unique id of this request (echoed from the request, or generated when omitted). Recorded in Axiym logs — quote it when contacting support about a failed request.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "examples": [
          "3fa85f64-5717-4562-b3fc-2c963f66afa6"
        ]
      }
    }
  }
}
```

### definition-12

`#/components/responses/InvalidParams`

```json
{
  "description": "The request could not be processed. Two variants share this status: a validation failure, where `errors` is an object keyed by field name, and a business rejection, where `errors` is null and `message` states the reason (e.g. `Documents Not Accepted` when uploading to an already decided onboarding application, `Onboarding Cannot Be Finished` when finishing an already rejected case, or the generic `Unprocessable Request`).",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "HTTP status code, duplicated in the body."
          },
          "message": {
            "type": "string",
            "description": "`Invalid Parameters` for validation failures; the rejection reason otherwise."
          },
          "errors": {
            "type": [
              "object",
              "null"
            ],
            "description": "Validation failures: object keyed by field name (camelCase); each value is either an array of ValidationError records (leaf), a nested object for struct fields, or an object keyed by array index for list fields. Business rejections: null.",
            "additionalProperties": {
              "$ref": "#/components/schemas/ValidationFieldErrors"
            }
          }
        },
        "required": [
          "code",
          "message",
          "errors"
        ]
      },
      "examples": {
        "Flat field errors": {
          "summary": "Flat field errors",
          "value": {
            "code": 422,
            "message": "Invalid Parameters",
            "errors": {
              "legalEntityName": [
                {
                  "code": "length",
                  "message": null,
                  "params": {
                    "value": "",
                    "min": 1
                  }
                }
              ],
              "currency": [
                {
                  "code": "invalid_currency",
                  "message": null,
                  "params": {
                    "value": "ZZZ"
                  }
                }
              ]
            }
          }
        },
        "Nested struct errors": {
          "summary": "Nested struct errors",
          "value": {
            "code": 422,
            "message": "Invalid Parameters",
            "errors": {
              "legalAddress": {
                "country": [
                  {
                    "code": "invalid_country",
                    "message": null,
                    "params": {
                      "value": "INVALID"
                    }
                  }
                ],
                "postalCode": [
                  {
                    "code": "length",
                    "message": null,
                    "params": {
                      "value": "",
                      "min": 1
                    }
                  }
                ]
              }
            }
          }
        },
        "List item errors": {
          "summary": "List item errors",
          "value": {
            "code": 422,
            "message": "Invalid Parameters",
            "errors": {
              "transactionHistory": {
                "0": {
                  "timestamp": [
                    {
                      "code": "invalid_date_time",
                      "message": null,
                      "params": {
                        "value": "2026-04-14"
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "Custom validator": {
          "summary": "Custom validator",
          "value": {
            "code": 422,
            "message": "Invalid Parameters",
            "errors": {
              "disbursementAccount": [
                {
                  "code": "disbursement_account_required",
                  "message": null,
                  "params": {
                    "value": null
                  }
                }
              ]
            }
          }
        },
        "Business rejection": {
          "summary": "Business rejection",
          "value": {
            "code": 422,
            "message": "Documents Not Accepted",
            "errors": null
          }
        },
        "Onboarding cannot be finished": {
          "summary": "Onboarding cannot be finished",
          "value": {
            "code": 422,
            "message": "Onboarding Cannot Be Finished",
            "errors": null
          }
        }
      }
    }
  },
  "headers": {
    "X-Request-Id": {
      "description": "Unique id of this request (echoed from the request, or generated when omitted). Recorded in Axiym logs — quote it when contacting support about a failed request.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "examples": [
          "3fa85f64-5717-4562-b3fc-2c963f66afa6"
        ]
      }
    }
  }
}
```

### definition-13

`#/components/schemas/ValidationFieldErrors`

```json
{
  "description": "Recursive structure: either an array of ValidationError records (leaf field), an object keyed by nested field names (Struct variant), or an object keyed by array indices (List variant).",
  "anyOf": [
    {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/ValidationError"
      }
    },
    {
      "type": "object",
      "additionalProperties": {
        "$ref": "#/components/schemas/ValidationFieldErrors"
      },
      "properties": {}
    }
  ]
}
```

### definition-14

`#/components/schemas/ValidationError`

```json
{
  "type": "object",
  "description": "Single validation error from the `validator` crate.",
  "properties": {
    "code": {
      "type": "string",
      "description": "Validation rule code (e.g. 'length', 'email', 'invalid_currency', 'disbursement_account_required').",
      "examples": [
        "length"
      ]
    },
    "message": {
      "type": [
        "string",
        "null"
      ],
      "description": "Human-readable message.",
      "examples": [
        "string"
      ]
    },
    "params": {
      "type": "object",
      "description": "Rule-specific parameters. Always includes `value` (the offending input). Additional keys depend on the rule (e.g. `min`, `max` for length).",
      "additionalProperties": true,
      "properties": {
        "value": {
          "description": "The submitted value that failed validation.",
          "examples": [
            "string"
          ]
        }
      }
    }
  },
  "required": [
    "code",
    "params"
  ]
}
```

### definition-15

`#/components/responses/InternalError`

```json
{
  "description": "",
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer",
            "description": "HTTP status code, duplicated in the body."
          },
          "message": {
            "type": "string",
            "description": "Human-readable message describing the error."
          },
          "errors": {
            "type": [
              "object",
              "null"
            ],
            "description": "Additional error details; null when there are none."
          }
        },
        "required": [
          "code",
          "message",
          "errors"
        ]
      },
      "examples": {
        "Example 1": {
          "summary": "Example 1",
          "value": {
            "code": 500,
            "message": "Internal Error",
            "errors": null
          }
        }
      }
    }
  },
  "headers": {
    "X-Request-Id": {
      "description": "Unique id of this request (echoed from the request, or generated when omitted). Recorded in Axiym logs — quote it when contacting support about a failed request.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "examples": [
          "3fa85f64-5717-4562-b3fc-2c963f66afa6"
        ]
      }
    }
  }
}
```
