{
  "openapi": "3.1.0",
  "info": {
    "title": "Axiym PNSL API",
    "description": "",
    "version": "2.0.0"
  },
  "servers": [
    {
      "url": "https://partner-api.sandbox.axiym.io/api/v1",
      "description": "Sandbox"
    },
    {
      "url": "https://partner-api.axiym.io/api/v1",
      "description": "Production"
    }
  ],
  "security": [
    {
      "Default": []
    }
  ],
  "tags": [
    {
      "name": "Auth",
      "description": "OAuth 2.0 client credentials authentication."
    },
    {
      "name": "Onboarding",
      "description": "Client onboarding applications and review status. Document intake is handled through Axiym's compliance KYB flow."
    },
    {
      "name": "Clients",
      "description": "Approved clients and their profile information."
    },
    {
      "name": "Credit Accounts",
      "description": "Credit limits and outstanding balances of your clients."
    },
    {
      "name": "Receivables",
      "description": "Client payment funding, repayments, refunds, and receivable status."
    },
    {
      "name": "Settings",
      "description": "Reference data used when constructing API requests."
    },
    {
      "name": "Webhook Subscriptions",
      "description": "Webhook endpoint registration, testing, and signing-key retrieval."
    },
    {
      "name": "Webhooks/Client",
      "description": "`client.*` webhook events."
    },
    {
      "name": "Webhooks/Credit Account",
      "description": "`credit-account.*` webhook events."
    },
    {
      "name": "Webhooks/Receivable",
      "description": "`receivable.*` webhook events."
    },
    {
      "name": "Webhooks/Conversion",
      "description": "`conversion.*` webhook events."
    },
    {
      "name": "Webhooks/Withdrawal",
      "description": "`withdrawal.*` webhook events."
    },
    {
      "name": "Webhooks/Recipient",
      "description": "`recipient.*` webhook events."
    },
    {
      "name": "Webhooks/Deposit",
      "description": "`deposit.*` webhook events."
    },
    {
      "name": "Webhooks/Account",
      "description": "`account.*` webhook events."
    }
  ],
  "paths": {
    "/oauth/token": {
      "post": {
        "summary": "Get new access token",
        "operationId": "getAccessToken",
        "deprecated": false,
        "tags": [
          "Auth"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "client_id": {
                    "type": "string",
                    "examples": [
                      "eb81336d-378a-4ab8-8c0e-a2f39ac0e87a"
                    ],
                    "example": "eb81336d-378a-4ab8-8c0e-a2f39ac0e87a"
                  },
                  "client_secret": {
                    "type": "string",
                    "examples": [
                      "d5a9df2f93dba5f3def1e1d7585f476f054fe955a02e6b152f3145adce49c6ffc94be6ea7a2d7385f111f17541c1fe0239e8902b33e41fed7610098995081d3e59b2fe7ae2877dcbcdcd04c14cdfa298e85a079066d0b1e0eaaa978110ba300c7e8341b68c0d9a8deb03122f4504e6317b53b473c5917e4ae073422241f59120"
                    ],
                    "example": "d5a9df2f93dba5f3def1e1d7585f476f054fe955a02e6b152f3145adce49c6ffc94be6ea7a2d7385f111f17541c1fe0239e8902b33e41fed7610098995081d3e59b2fe7ae2877dcbcdcd04c14cdfa298e85a079066d0b1e0eaaa978110ba300c7e8341b68c0d9a8deb03122f4504e6317b53b473c5917e4ae073422241f59120"
                  },
                  "grant_type": {
                    "type": "string",
                    "examples": [
                      "client_credentials"
                    ],
                    "example": "client_credentials"
                  },
                  "scope": {
                    "type": "string",
                    "enum": [
                      "PNSL"
                    ],
                    "examples": [
                      "PNSL"
                    ],
                    "example": "PNSL"
                  }
                }
              },
              "example": {
                "client_id": "eb81336d-378a-4ab8-8c0e-a2f39ac0e87a",
                "client_secret": "d5a9df2f93dba5f3def1e1d7585f476f054fe955a02e6b152f3145adce49c6ffc94be6ea7a2d7385f111f17541c1fe0239e8902b33e41fed7610098995081d3e59b2fe7ae2877dcbcdcd04c14cdfa298e85a079066d0b1e0eaaa978110ba300c7e8341b68c0d9a8deb03122f4504e6317b53b473c5917e4ae073422241f59120",
                "grant_type": "client_credentials",
                "scope": "PNSL"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "token_type": {
                      "type": "string"
                    },
                    "expires_in": {
                      "type": "integer"
                    },
                    "access_token": {
                      "type": "string"
                    },
                    "scope": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "token_type",
                    "expires_in",
                    "access_token",
                    "scope"
                  ]
                }
              }
            },
            "headers": {}
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": ""
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": ""
          }
        },
        "security": []
      }
    },
    "/onboardings": {
      "post": {
        "summary": "Start Client Onboarding",
        "operationId": "startOnboarding",
        "deprecated": false,
        "tags": [
          "Onboarding"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "legalEntityName": {
                    "type": "string",
                    "description": "Official name of the company",
                    "example": "Test Corp Ltd"
                  },
                  "incorporationDate": {
                    "type": "string",
                    "description": "Date legal entity was established",
                    "title": "",
                    "format": "date",
                    "example": "2020-01-15"
                  },
                  "registrationDate": {
                    "type": "string",
                    "description": "Date when the company registered / joined your network",
                    "format": "date",
                    "example": "2020-02-01"
                  },
                  "legalAddress": {
                    "$ref": "#/components/schemas/Address",
                    "description": "Legal Address"
                  },
                  "currency": {
                    "$ref": "#/components/schemas/Currency",
                    "example": "USD"
                  },
                  "partnerClientId": {
                    "type": "string",
                    "description": "Unique identifier from the partner side to maintain data mapping and ensure onboarding uniqueness.",
                    "example": "my-internal-ref-001"
                  },
                  "disbursementAccount": {
                    "description": "Bank account details",
                    "$ref": "#/components/schemas/DisbursementAccount"
                  },
                  "paymentRails": {
                    "type": "string",
                    "description": "Payment Rail Code",
                    "example": "ZENUS_BANK"
                  }
                },
                "required": [
                  "legalEntityName",
                  "legalAddress",
                  "registrationDate",
                  "incorporationDate",
                  "currency"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Onboarding application accepted and submitted for review.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OnboardingCase"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": ""
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/InvalidParams",
            "description": ""
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": ""
          }
        },
        "security": [
          {
            "Default": []
          }
        ],
        "description": "Creates and immediately submits a client onboarding case for compliance review. Document intake is owned by Axiym's compliance KYB flow. The client is visible in `GET /clients` after approval; track the case with `GET /onboardings/{clientId}`."
      }
    },
    "/onboardings/{clientId}": {
      "get": {
        "summary": "Get Onboarding Status",
        "operationId": "getOnboardingStatus",
        "tags": [
          "Onboarding"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ClientId"
          },
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "Current state of the onboarding application.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OnboardingCase"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "Default": []
          }
        ]
      }
    },
    "/clients": {
      "get": {
        "summary": "List all Clients",
        "deprecated": false,
        "operationId": "ListCompanies",
        "tags": [
          "Clients"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          },
          {
            "name": "first",
            "in": "query",
            "description": "Maximum number of items to return (page size).",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 100,
              "examples": [
                10
              ]
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Cursor for the next page, from the previous response's pageInfo.endCursor.",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "eyJvZmZzZXQiOjI1fQ=="
              ]
            }
          },
          {
            "name": "searchQuery",
            "in": "query",
            "description": "Free-text search query.",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "Acme"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "nodes": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Client"
                      },
                      "description": "A list of nodes."
                    },
                    "pageInfo": {
                      "$ref": "#/components/schemas/PageInfo",
                      "description": "Information to aid in pagination."
                    }
                  },
                  "required": [
                    "nodes",
                    "pageInfo"
                  ]
                }
              }
            },
            "headers": {}
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": ""
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/InvalidParams",
            "description": ""
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": ""
          }
        },
        "security": [
          {
            "Default": []
          }
        ]
      }
    },
    "/clients/{clientId}": {
      "get": {
        "summary": "Get Client Profile",
        "deprecated": false,
        "operationId": "GetCompany",
        "tags": [
          "Clients"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "description": "Client identifier (UUID).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "b7e8c1a2-9f43-4d2e-8a6b-1c2d3e4f5a6b"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Client"
                }
              }
            },
            "headers": {}
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": ""
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": ""
          },
          "422": {
            "$ref": "#/components/responses/InvalidParams",
            "description": ""
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": ""
          }
        },
        "security": [
          {
            "Default": []
          }
        ]
      }
    },
    "/clients/{clientId}/credit-accounts": {
      "get": {
        "summary": "List Credit Accounts",
        "operationId": "listCreditAccounts",
        "deprecated": false,
        "tags": [
          "Credit Accounts"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "description": "Client identifier (UUID).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "b7e8c1a2-9f43-4d2e-8a6b-1c2d3e4f5a6b"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/RequestId"
          },
          {
            "name": "first",
            "in": "query",
            "description": "Maximum number of items to return (page size).",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 100,
              "examples": [
                20
              ]
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Cursor for the next page, from the previous response's pageInfo.endCursor.",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "eyJvZmZzZXQiOjI1fQ=="
              ]
            }
          },
          {
            "name": "currency",
            "in": "query",
            "description": "Filter by currency.",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Currency",
              "examples": [
                "USD"
              ]
            }
          },
          {
            "name": "paymentRails",
            "in": "query",
            "description": "Filter by payment rail.",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "ZENUS_BANK"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "nodes": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/CreditAccount"
                      }
                    },
                    "pageInfo": {
                      "$ref": "#/components/schemas/PageInfo"
                    }
                  },
                  "required": [
                    "nodes",
                    "pageInfo"
                  ]
                }
              }
            },
            "headers": {}
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": ""
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": ""
          },
          "422": {
            "$ref": "#/components/responses/InvalidParams",
            "description": ""
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": ""
          }
        },
        "security": [
          {
            "Default": []
          }
        ]
      }
    },
    "/clients/{clientId}/receivables": {
      "get": {
        "summary": "List Receivables",
        "operationId": "listReceivables",
        "deprecated": false,
        "tags": [
          "Receivables"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "description": "Client identifier (UUID).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "b7e8c1a2-9f43-4d2e-8a6b-1c2d3e4f5a6b"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/RequestId"
          },
          {
            "name": "first",
            "in": "query",
            "description": "Maximum number of items to return (page size).",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 100,
              "examples": [
                20
              ]
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Cursor for the next page, from the previous response's pageInfo.endCursor.",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "eyJvZmZzZXQiOjI1fQ=="
              ]
            }
          },
          {
            "name": "currency",
            "in": "query",
            "description": "Filter by currency.",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/Currency",
              "examples": [
                "USD"
              ]
            }
          },
          {
            "name": "paymentRails",
            "in": "query",
            "description": "Filter by payment rail.",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "ZENUS_BANK"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/ConversionStatus",
              "examples": [
                "PENDING"
              ]
            },
            "description": "Filter by status."
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "nodes": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Receivable"
                      }
                    },
                    "pageInfo": {
                      "$ref": "#/components/schemas/PageInfo"
                    }
                  },
                  "required": [
                    "nodes",
                    "pageInfo"
                  ]
                }
              }
            },
            "headers": {}
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": ""
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": ""
          },
          "422": {
            "$ref": "#/components/responses/InvalidParams",
            "description": ""
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": ""
          }
        },
        "security": [
          {
            "Default": []
          }
        ]
      },
      "post": {
        "summary": "Fund a Payment",
        "operationId": "fundPayment",
        "deprecated": false,
        "tags": [
          "Receivables"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "description": "Client identifier (UUID).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "b7e8c1a2-9f43-4d2e-8a6b-1c2d3e4f5a6b"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/RequestId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "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": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Receivable"
                }
              }
            },
            "headers": {}
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": ""
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": ""
          },
          "422": {
            "$ref": "#/components/responses/InvalidParams",
            "description": ""
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": ""
          }
        },
        "security": [
          {
            "Default": []
          }
        ]
      }
    },
    "/clients/{clientId}/repayments": {
      "post": {
        "tags": [
          "Receivables"
        ],
        "summary": "Trigger repayment from client balance",
        "operationId": "createRepayment",
        "parameters": [
          {
            "$ref": "#/components/parameters/ClientId"
          },
          {
            "$ref": "#/components/parameters/RequestId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "currency"
                ],
                "properties": {
                  "currency": {
                    "$ref": "#/components/schemas/Currency"
                  },
                  "paymentRails": {
                    "type": "string",
                    "description": "Payment rail code."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "FIFO repayment triggered from the linked client account balance.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestStatus"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "422": {
            "$ref": "#/components/responses/InvalidParams"
          },
          "500": {
            "$ref": "#/components/responses/InternalError"
          }
        },
        "security": [
          {
            "Default": []
          }
        ],
        "description": "Triggers FIFO repayment of the client's outstanding receivables from its linked account balance. No amount is supplied. This uses the same mechanics as deposit-driven auto-repayment."
      }
    },
    "/clients/{clientId}/refunds": {
      "post": {
        "summary": "Create a Refund",
        "operationId": "createRefund",
        "deprecated": false,
        "tags": [
          "Receivables"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "description": "Client identifier (UUID).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "b7e8c1a2-9f43-4d2e-8a6b-1c2d3e4f5a6b"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/RequestId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "amount": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/Decimal"
                      }
                    ],
                    "description": "Amount"
                  },
                  "currency": {
                    "$ref": "#/components/schemas/Currency"
                  },
                  "paymentRails": {
                    "type": "string",
                    "description": "Payment Rail Code"
                  }
                },
                "required": [
                  "amount",
                  "currency"
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestStatus"
                }
              }
            },
            "headers": {}
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": ""
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": ""
          },
          "422": {
            "$ref": "#/components/responses/InvalidParams",
            "description": ""
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": ""
          }
        },
        "security": [
          {
            "Default": []
          }
        ]
      }
    },
    "/clients/{clientId}/receivables/{receivableId}": {
      "get": {
        "summary": "Get a Receivable",
        "deprecated": false,
        "operationId": "GetReceivable",
        "tags": [
          "Receivables"
        ],
        "parameters": [
          {
            "name": "clientId",
            "in": "path",
            "description": "Client identifier (UUID).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "b7e8c1a2-9f43-4d2e-8a6b-1c2d3e4f5a6b"
              ]
            }
          },
          {
            "name": "receivableId",
            "in": "path",
            "description": "Receivable identifier (UUID).",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "examples": [
                "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              ]
            }
          },
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Receivable"
                }
              }
            },
            "headers": {}
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": ""
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": ""
          },
          "422": {
            "$ref": "#/components/responses/InvalidParams",
            "description": ""
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": ""
          }
        },
        "security": [
          {
            "Default": []
          }
        ]
      }
    },
    "/settings/payment-rails": {
      "get": {
        "summary": "Payment Rails",
        "operationId": "listPaymentRails",
        "deprecated": false,
        "tags": [
          "Settings"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "nodes": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PaymentRails"
                      }
                    }
                  },
                  "required": [
                    "nodes"
                  ]
                }
              }
            },
            "headers": {}
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": ""
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": ""
          },
          "422": {
            "$ref": "#/components/responses/InvalidParams",
            "description": ""
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": ""
          }
        },
        "security": [
          {
            "Default": []
          }
        ]
      }
    },
    "/webhooks/subscriptions": {
      "get": {
        "summary": "List all Subscriptions",
        "operationId": "listWebhookSubscriptions",
        "deprecated": false,
        "tags": [
          "Webhook Subscriptions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          },
          {
            "name": "first",
            "in": "query",
            "description": "Maximum number of items to return (page size).",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10,
              "maximum": 100,
              "examples": [
                20
              ]
            }
          },
          {
            "name": "after",
            "in": "query",
            "description": "Cursor for the next page, from the previous response's pageInfo.endCursor.",
            "required": false,
            "schema": {
              "type": "string",
              "examples": [
                "eyJvZmZzZXQiOjI1fQ=="
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "nodes": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Subscription"
                      }
                    },
                    "pageInfo": {
                      "$ref": "#/components/schemas/PageInfo"
                    }
                  },
                  "required": [
                    "nodes",
                    "pageInfo"
                  ]
                }
              }
            },
            "headers": {}
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": ""
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/InvalidParams",
            "description": ""
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": ""
          }
        },
        "security": [
          {
            "Default": []
          }
        ]
      },
      "post": {
        "summary": "Create Subscription",
        "operationId": "createWebhookSubscription",
        "deprecated": false,
        "tags": [
          "Webhook Subscriptions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "endpoint": {
                    "type": "string",
                    "title": "",
                    "description": "URL of the endpoint to subscribe to notifications. Must be publicly accessible, use HTTPS, and respond with a 2XX status to a POST request."
                  }
                },
                "required": [
                  "endpoint"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "headers": {}
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": ""
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "Forbidden"
          },
          "422": {
            "$ref": "#/components/responses/InvalidParams",
            "description": ""
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": ""
          }
        },
        "security": [
          {
            "Default": []
          }
        ]
      }
    },
    "/webhooks/subscriptions/{subscriptionId}/tests": {
      "post": {
        "summary": "Test Subscription",
        "operationId": "testWebhookSubscription",
        "deprecated": false,
        "tags": [
          "Webhook Subscriptions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SubscriptionId"
          },
          {
            "$ref": "#/components/parameters/RequestId"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RequestStatus"
                }
              }
            },
            "headers": {}
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": ""
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": ""
          },
          "422": {
            "$ref": "#/components/responses/InvalidParams",
            "description": ""
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": ""
          }
        },
        "security": [
          {
            "Default": []
          }
        ]
      }
    },
    "/webhooks/subscriptions/{subscriptionId}": {
      "delete": {
        "summary": "Disable Subscription",
        "operationId": "disableWebhookSubscription",
        "deprecated": false,
        "tags": [
          "Webhook Subscriptions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/SubscriptionId"
          },
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                }
              }
            },
            "headers": {}
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": ""
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": ""
          },
          "422": {
            "$ref": "#/components/responses/InvalidParams",
            "description": ""
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": ""
          }
        },
        "security": [
          {
            "Default": []
          }
        ]
      }
    },
    "/webhooks/public-keys/{publicKeyId}": {
      "get": {
        "summary": "Get Webhook Public Key",
        "operationId": "getWebhookPublicKey",
        "deprecated": false,
        "tags": [
          "Webhook Subscriptions"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/PublicKeyId"
          },
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicKey"
                }
              }
            },
            "headers": {}
          },
          "400": {
            "$ref": "#/components/responses/BadRequest",
            "description": ""
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized",
            "description": ""
          },
          "403": {
            "$ref": "#/components/responses/Forbidden",
            "description": "Forbidden"
          },
          "404": {
            "$ref": "#/components/responses/NotFound",
            "description": ""
          },
          "422": {
            "$ref": "#/components/responses/InvalidParams",
            "description": ""
          },
          "500": {
            "$ref": "#/components/responses/InternalError",
            "description": ""
          }
        },
        "security": [
          {
            "Default": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Client": {
        "type": "object",
        "properties": {
          "clientId": {
            "type": "string",
            "format": "uuid",
            "description": "Client identifier (UUID).",
            "examples": [
              "b7e8c1a2-9f43-4d2e-8a6b-1c2d3e4f5a6b"
            ]
          },
          "code": {
            "type": "string",
            "description": "Human-readable client code.",
            "examples": [
              "AXI000221"
            ]
          },
          "legalEntityName": {
            "type": "string",
            "description": "Official name of the company",
            "examples": [
              "Acme Corporation"
            ]
          },
          "legalAddress": {
            "description": "Legal Address",
            "$ref": "#/components/schemas/Address"
          },
          "incorporationDate": {
            "type": "string",
            "description": "Date legal entity was established",
            "format": "date",
            "examples": [
              "2026-06-23"
            ]
          },
          "registrationDate": {
            "type": "string",
            "description": "Date when the company registered / joined your network",
            "format": "date",
            "examples": [
              "2026-06-23"
            ]
          },
          "status": {
            "type": "string",
            "description": "Client status.",
            "enum": [
              "ONBOARDING",
              "ACTIVE",
              "DISABLED"
            ],
            "examples": [
              "ONBOARDING"
            ]
          },
          "currency": {
            "$ref": "#/components/schemas/Currency",
            "description": "Currency code (ISO 4217 fiat or supported stablecoin).",
            "examples": [
              "USD"
            ]
          },
          "disbursementAccount": {
            "$ref": "#/components/schemas/DisbursementAccount",
            "description": "Account that received the disbursement."
          },
          "partnerClientId": {
            "type": "string",
            "description": "Your own identifier for this client.",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "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": [
          "clientId",
          "legalEntityName",
          "legalAddress",
          "status",
          "incorporationDate",
          "registrationDate",
          "paymentRails",
          "currency",
          "code"
        ]
      },
      "PageInfo": {
        "type": "object",
        "properties": {
          "hasNextPage": {
            "type": "boolean",
            "description": "When paginating forwards, are there more items?",
            "examples": [
              true
            ]
          },
          "endCursor": {
            "type": "string",
            "description": "When paginating forwards, the cursor to continue.",
            "examples": [
              "eyJvZmZzZXQiOjI1fQ=="
            ]
          }
        },
        "required": [
          "hasNextPage"
        ]
      },
      "Receivable": {
        "type": "object",
        "properties": {
          "receivableId": {
            "type": "string",
            "description": "Receivable identifier (UUID).",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "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": {
            "type": "string",
            "description": "Receivable status.",
            "examples": [
              "DISBURSED"
            ]
          },
          "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"
        ]
      },
      "Address": {
        "type": "object",
        "properties": {
          "city": {
            "type": "string",
            "description": "City portion of the address.",
            "examples": [
              "New York"
            ]
          },
          "country": {
            "type": "string",
            "description": "Country portion of the address. Formatted as a two-letter country code specified in ISO 3166-1 alpha-2.",
            "examples": [
              "US"
            ]
          },
          "address": {
            "type": "string",
            "description": "Line one of the street address.",
            "examples": [
              "350 Fifth Avenue"
            ]
          },
          "addressExtended": {
            "type": "string",
            "description": "Line two of the street address.",
            "examples": [
              "Suite 1200"
            ]
          },
          "district": {
            "type": "string",
            "description": "State / County / Province / Region portion of the address. If the country is US or Canada, then district is required and should use the two-letter code for the subdivision.",
            "examples": [
              "NY"
            ]
          },
          "postalCode": {
            "type": "string",
            "description": "Postal / ZIP code of the address.",
            "examples": [
              "10115"
            ]
          }
        },
        "required": [
          "postalCode",
          "country",
          "address"
        ]
      },
      "RequestStatus": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "description": "Request status.",
            "examples": [
              "OK"
            ],
            "default": "OK",
            "enum": [
              "OK"
            ]
          }
        },
        "required": [
          "status"
        ]
      },
      "Subscription": {
        "type": "object",
        "properties": {
          "subscriptionId": {
            "type": "string",
            "description": "Subscription identifier (UUID).",
            "format": "uuid",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "endpoint": {
            "type": "string",
            "description": "URL of the endpoint to subscribe to notifications. Must be publicly accessible, use HTTPS, and respond with a 2XX status to a POST request.",
            "title": "",
            "format": "uri",
            "examples": [
              "https://api.acme.example/webhooks"
            ]
          }
        },
        "required": [
          "subscriptionId",
          "endpoint"
        ]
      },
      "PublicKey": {
        "type": "object",
        "properties": {
          "publicKeyId": {
            "type": "string",
            "description": "Public key identifier (UUID).",
            "format": "uuid",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "active": {
            "type": "boolean",
            "description": "Indicates whether the key is active",
            "examples": [
              true
            ]
          },
          "algorithm": {
            "type": "string",
            "description": "Encryption algorithm",
            "examples": [
              "ECDSA_SHA_256"
            ]
          },
          "publicKey": {
            "type": "string",
            "description": "Public Key",
            "examples": [
              "string"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp. Formatted in ISO 8601.",
            "examples": [
              "2026-06-23T14:05:09Z"
            ]
          }
        },
        "required": [
          "publicKeyId",
          "algorithm",
          "publicKey",
          "createdAt",
          "active"
        ]
      },
      "PaymentRails": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Payment rail code (e.g. `ZENUS_BANK`, `TRON`).",
            "examples": [
              "ZENUS_BANK"
            ]
          },
          "description": {
            "type": "string",
            "description": "Human-readable description.",
            "examples": [
              "Zenus Bank — USD/EUR wire settlement"
            ]
          },
          "currencies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Currency"
            },
            "description": "Allowed currencies."
          }
        },
        "required": [
          "code",
          "description",
          "currencies"
        ]
      },
      "DisbursementAccount": {
        "type": "object",
        "properties": {
          "accountNumber": {
            "type": "string",
            "description": "Bank account number.",
            "examples": [
              "0123456789"
            ]
          }
        }
      },
      "ValidationError": {
        "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": [
              "AXI000221"
            ]
          },
          "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"
        ]
      },
      "ValidationFieldErrors": {
        "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": {}
          }
        ]
      },
      "TransactionRef": {
        "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"
            ]
          }
        }
      },
      "Currency": {
        "type": "string",
        "description": "Currency code — ISO 4217 fiat (e.g. USD, EUR) or a supported stablecoin (USDT, USDC).",
        "examples": [
          "USD"
        ]
      },
      "Decimal": {
        "type": "string",
        "description": "Decimal number serialized as a string to preserve precision.",
        "examples": [
          "1000.00"
        ]
      },
      "ConversionStatus": {
        "type": "string",
        "description": "`PENDING` after creation (awaiting confirmation), `ACTIVE` once confirmed (executing), `COMPLETED` on settlement, `CANCELED` if canceled before execution or if it could not settle.\n",
        "enum": [
          "PENDING",
          "ACTIVE",
          "COMPLETED",
          "CANCELED"
        ],
        "examples": [
          "PENDING"
        ]
      },
      "CreditAccount": {
        "type": "object",
        "properties": {
          "creditAccountId": {
            "type": "string",
            "format": "uuid",
            "description": "Credit account identifier (UUID).",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "currency": {
            "$ref": "#/components/schemas/Currency",
            "description": "Currency code (ISO 4217 fiat or supported stablecoin).",
            "examples": [
              "USD"
            ]
          },
          "creditLimit": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Decimal"
              }
            ],
            "description": "Maximum credit available to the client."
          },
          "availableBalance": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Decimal"
              }
            ],
            "description": "Amount currently available to borrow — i.e., available to finance a payment."
          },
          "balance": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Decimal"
              }
            ],
            "description": "Balance of the client's linked repayment-source account. It is absent until that account is provisioned."
          },
          "principalOutstanding": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Decimal"
              }
            ],
            "description": "Total principal currently borrowed (outstanding)."
          },
          "totalRepaymentAmount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Decimal"
              }
            ],
            "description": "Total amount due to repay (principal, interest and fees)."
          },
          "totalInterestAmount": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Decimal"
              }
            ],
            "description": "Total interest accrued."
          },
          "status": {
            "type": "string",
            "description": "CreditAccount status.",
            "enum": [
              "PENDING",
              "ACTIVE",
              "DISABLED"
            ],
            "examples": [
              "PENDING"
            ]
          },
          "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": [
          "creditAccountId",
          "paymentRails",
          "currency",
          "creditLimit",
          "availableBalance",
          "principalOutstanding",
          "totalRepaymentAmount",
          "totalInterestAmount",
          "status"
        ],
        "description": "A credit (borrowing) account."
      },
      "OnboardingCase": {
        "type": "object",
        "properties": {
          "clientId": {
            "type": "string",
            "format": "uuid",
            "description": "Client identifier (UUID).",
            "examples": [
              "b7e8c1a2-9f43-4d2e-8a6b-1c2d3e4f5a6b"
            ]
          },
          "code": {
            "type": "string",
            "description": "Human-readable client code.",
            "examples": [
              "AXI000221"
            ]
          },
          "legalEntityName": {
            "type": "string",
            "description": "Official name of the company",
            "examples": [
              "Acme Corporation"
            ]
          },
          "legalAddress": {
            "description": "Legal Address",
            "$ref": "#/components/schemas/Address"
          },
          "incorporationDate": {
            "type": "string",
            "description": "Date legal entity was established",
            "format": "date",
            "examples": [
              "2026-06-23"
            ]
          },
          "registrationDate": {
            "type": "string",
            "description": "Date when the company registered / joined your network",
            "format": "date",
            "examples": [
              "2026-06-23"
            ]
          },
          "status": {
            "type": "string",
            "description": "Onboarding application status.",
            "enum": [
              "ONBOARDING",
              "APPROVED",
              "REJECTED"
            ],
            "examples": [
              "ONBOARDING"
            ]
          },
          "currency": {
            "$ref": "#/components/schemas/Currency",
            "description": "Currency code (ISO 4217 fiat or supported stablecoin).",
            "examples": [
              "USD"
            ]
          },
          "disbursementAccount": {
            "$ref": "#/components/schemas/DisbursementAccount",
            "description": "Account that received the disbursement."
          },
          "partnerClientId": {
            "type": "string",
            "description": "Your own identifier for this client.",
            "examples": [
              "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            ]
          },
          "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": [
          "clientId",
          "code",
          "legalEntityName",
          "status"
        ],
        "description": "Snapshot of a client onboarding application. Created in the submitted state and reviewed by Axiym compliance; while the review is in progress the status stays ONBOARDING. Once approved, the client appears in `GET /clients`; a rejected application ends in REJECTED."
      }
    },
    "responses": {
      "BadRequest": {
        "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"
              ]
            }
          }
        }
      },
      "Unauthorized": {
        "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"
              ]
            }
          }
        }
      },
      "InternalError": {
        "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"
              ]
            }
          }
        }
      },
      "NotFound": {
        "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"
              ]
            }
          }
        }
      },
      "InvalidParams": {
        "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"
              ]
            }
          }
        }
      },
      "Forbidden": {
        "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"
              ]
            }
          }
        }
      }
    },
    "securitySchemes": {
      "Default": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "parameters": {
      "ClientId": {
        "name": "clientId",
        "in": "path",
        "required": true,
        "description": "Client identifier (UUID).",
        "schema": {
          "type": "string",
          "format": "uuid",
          "examples": [
            "b7e8c1a2-9f43-4d2e-8a6b-1c2d3e4f5a6b"
          ]
        }
      },
      "SubscriptionId": {
        "name": "subscriptionId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid",
          "examples": [
            "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          ]
        },
        "description": "Subscription identifier (UUID)."
      },
      "PublicKeyId": {
        "name": "publicKeyId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "string",
          "format": "uuid",
          "examples": [
            "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          ]
        },
        "description": "Public key identifier (UUID)."
      },
      "IdempotencyKey": {
        "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"
          ]
        }
      },
      "RequestId": {
        "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"
          ]
        }
      }
    }
  }
}
