{
  "openapi": "3.1.0",
  "info": {
    "title": "Hubpay Connect",
    "description": "API reference for Hubpay payments, FX, wallets, onboarding, transactions and webhooks.",
    "contact": {
      "name": "Hubpay",
      "url": "https://hubpay.io/",
      "email": "engineering@hubpay.io"
    },
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://sandbox-api.hubpay.io",
      "description": "Sandbox"
    },
    {
      "url": "https://api.hubpay.io",
      "description": "Production"
    }
  ],
  "security": [
    {
      "Authorization": []
    }
  ],
  "tags": [
    {
      "name": "Webhook management",
      "description": "Operations related to webhook management"
    },
    {
      "name": "Connections",
      "description": "Partner app connection management"
    },
    {
      "name": "Wallets",
      "description": "Operations related to wallets and balances"
    },
    {
      "name": "Authentication",
      "description": "Token generation for registered clients"
    },
    {
      "name": "RFI",
      "description": "Operations for fetching and responding to RFI (Request For Information) cases"
    },
    {
      "name": "Payments",
      "description": "Operations related to Payments"
    },
    {
      "name": "Funding accounts",
      "description": "Retrieval of funding accounts on currencies the account holding a wallet"
    },
    {
      "name": "Exchange",
      "description": "Operations related to foreign exchange"
    },
    {
      "name": "Beneficiaries",
      "description": "Beneficiary management"
    },
    {
      "name": "Transactions",
      "description": "Operations related to transactions"
    },
    {
      "name": "Account",
      "description": "Account creation and management"
    },
    {
      "name": "Business Profile",
      "description": "Business profile management"
    },
    {
      "name": "Branding",
      "description": "Account branding configuration"
    },
    {
      "name": "Persons",
      "description": "Related persons management"
    },
    {
      "name": "Corporates",
      "description": "Related corporate entity management"
    },
    {
      "name": "Documents",
      "description": "Document management"
    },
    {
      "name": "Users",
      "description": "User management"
    },
    {
      "name": "Payment Requests",
      "description": "Payment request management"
    },
    {
      "name": "Payers",
      "description": "Payer management"
    },
    {
      "name": "Receipts",
      "description": "Payment receipt management"
    },
    {
      "name": "Sandbox simulations",
      "description": "Test collection deposits, expiry and completion in sandbox"
    },
    {
      "name": "Rates",
      "description": "Exchange rates for collections"
    }
  ],
  "paths": {
    "/v1/collections/payment-requests/{id}/refresh-session": {
      "put": {
        "tags": [
          "Payment Requests"
        ],
        "summary": "Refresh payment session",
        "description": "Refreshes the payment session token and returns the updated payment request. A refreshed payment session is valid for the remainder of the payment request's lifetime, at most 1 hour, and never outlives the request's expiresAt. This endpoint is only applicable for payment requests with an execution mode of HOSTED_PAGE or EMBEDDED, a status of UNPAID or PART_PAID, and an expiresAt still in the future. If the request does not meet these criteria, a bad request will be returned. The payer must have an email address on file to refresh the session for a crypto-enabled payment request.",
        "operationId": "refreshPaymentSession",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequest"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/collections/payers/{id}": {
      "get": {
        "tags": [
          "Payers"
        ],
        "summary": "Get a payer by ID",
        "operationId": "getPayer",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Unique identifier of the payer",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier of the payer",
              "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            },
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payer"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "put": {
        "tags": [
          "Payers"
        ],
        "summary": "Update payer",
        "description": "Overwrites the existing payer with the provided details",
        "operationId": "updatePayer",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Unique identifier of the payer",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Unique identifier of the payer",
              "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            },
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PayerUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payer"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/beneficiaries/{id}": {
      "get": {
        "tags": [
          "Beneficiaries"
        ],
        "summary": "Get beneficiary",
        "description": "Fetches the beneficiary details based on provided id",
        "operationId": "getBeneficiary",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Unique identifier of the beneficiary",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier of the beneficiary",
              "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            },
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Beneficiary"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "put": {
        "tags": [
          "Beneficiaries"
        ],
        "summary": "Update a beneficiary",
        "description": "Update a beneficiary",
        "operationId": "updateBeneficiary",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Unique identifier of the beneficiary",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier of the beneficiary",
              "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            },
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BeneficiaryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Beneficiary"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/account/users/{id}": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get user",
        "description": "Get a user linked to the account",
        "operationId": "getUser",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          },
          {
            "name": "id",
            "in": "path",
            "description": "Unique identifier of the user",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier of the user",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "put": {
        "tags": [
          "Users"
        ],
        "summary": "Update user",
        "description": "Update user display name and blocked status",
        "operationId": "updateUser",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          },
          {
            "name": "id",
            "in": "path",
            "description": "Unique identifier of the user",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier of the user",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Users"
        ],
        "summary": "Delete user",
        "description": "Deactivate a user linked to the account",
        "operationId": "deleteUser",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          },
          {
            "name": "id",
            "in": "path",
            "description": "Unique identifier of the user",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier of the user",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/account/users/{id}/role": {
      "put": {
        "tags": [
          "Users"
        ],
        "summary": "Update user role",
        "description": "Update the role of a user linked to the account",
        "operationId": "updateUserRole",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          },
          {
            "name": "id",
            "in": "path",
            "description": "Unique identifier of the user",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier of the user",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/account/submit": {
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Confirm account submission",
        "description": "Confirm that the account details and supporting document is ready for review and approval",
        "operationId": "confirmAccountSubmission",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConfirmSubmissionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/account/related-party/persons/{personId}": {
      "get": {
        "tags": [
          "Persons"
        ],
        "summary": "Get person",
        "description": "For business accounts - get details of a Shareholder, Director or Authorised Signatory",
        "operationId": "getPerson",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          },
          {
            "name": "personId",
            "in": "path",
            "description": "Unique identifier of the related person",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier of the related person",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RelatedPerson"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "put": {
        "tags": [
          "Persons"
        ],
        "summary": "Update person",
        "description": "For business accounts - update details of Shareholders, Directors and Authorised Signatories<br/><ul><li><b>Shareholders</b>: Individuals who hold shares in the company</li><li><b>Directors</b>: People legally responsible for managing the company's operations and decision-making</li><li><b>Authorised Signatories</b>: Individuals who have the authority to sign documents and make official commitments on behalf of the company</li></ul>",
        "operationId": "updatePerson",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          },
          {
            "name": "personId",
            "in": "path",
            "description": "Unique identifier of the related person",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier of the related person",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RelatedPersonRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RelatedPerson"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/account/related-party/corporates/{corporateId}": {
      "get": {
        "tags": [
          "Corporates"
        ],
        "summary": "Get corporate",
        "description": "Get details of a specific corporate entity related to the business account",
        "operationId": "getCorporate",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          },
          {
            "name": "corporateId",
            "in": "path",
            "description": "Unique identifier of the related corporate entity",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier of the related corporate entity",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RelatedCorporate"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "put": {
        "tags": [
          "Corporates"
        ],
        "summary": "Update corporate",
        "description": "Update details of a corporate entity related to the business account.<br/><ul><li><b>Parent</b>: A company that owns or controls the business being onboarded</li><li><b>Subsidiary</b>: A company that is owned or controlled by the business being onboarded</li></ul>",
        "operationId": "updateCorporate",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          },
          {
            "name": "corporateId",
            "in": "path",
            "description": "Unique identifier of the related corporate entity",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier of the related corporate entity",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RelatedCorporateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RelatedCorporate"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/account/business-profile": {
      "get": {
        "tags": [
          "Business Profile"
        ],
        "summary": "Get business profile",
        "description": "For business accounts only - retrieves the business profile.",
        "operationId": "getBusinessProfile",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BusinessProfileResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "put": {
        "tags": [
          "Business Profile"
        ],
        "summary": "Update business profile",
        "description": "For business accounts only - updates the business profile",
        "operationId": "updateBusinessProfile",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BusinessProfileRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/account/branding": {
      "get": {
        "tags": [
          "Branding"
        ],
        "summary": "Get account brand settings",
        "description": "Retrieves the branding configuration.",
        "operationId": "getBranding",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountBranding"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "put": {
        "tags": [
          "Branding"
        ],
        "summary": "Update account brand settings",
        "description": "Updates the branding configuration.\nAll fields are optional. Any field supplied in the request will be applied.\nThis endpoint supports multipart/form-data for file upload and text parameters.\n",
        "operationId": "updateBranding",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/UpdateBrandingRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountBranding"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/account/branding/reset": {
      "put": {
        "tags": [
          "Branding"
        ],
        "summary": "Reset account brand settings",
        "description": "Resets all branding settings (primary color, secondary color, and logo) to defaults.",
        "operationId": "resetBranding",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/webhooks": {
      "get": {
        "tags": [
          "Webhook management"
        ],
        "summary": "List all registered webhooks",
        "description": "Retrieve a paged list of webhooks currently registered",
        "operationId": "listWebhooks",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Zero-based page index (0..N)",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "description": "The size of the page to be returned",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "minimum": 1
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedModelWebhookRegister"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Webhook management"
        ],
        "summary": "Register a webhook to receive events through.",
        "description": "Subscribe to one or more event types with a specified callback URL. App connection partners registering to receive callbacks for a connected customer's activities may also supply the `AccountId` header if they wish to use per-connection callback URLs.",
        "operationId": "registerWebhook",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "<i>(optional)</i> Identifies the connected customer the webhook is being registered for. App connection partners may set this to the `customerAccountId` of an active connection when registering to receive callbacks for that customer's activities (for example, a payment request being created) to a connection-specific URL - this is not mandatory (partners can leave this unset and will receive callbacks for registered events, for all connected customers, to the specified URL).",
            "required": false,
            "schema": {
              "type": "string",
              "description": "<i>(optional)</i> Identifies the connected customer the webhook is being registered for. App connection partners may set this to the `customerAccountId` of an active connection when registering to receive callbacks for that customer's activities (for example, a payment request being created) to a connection-specific URL - this is not mandatory (partners can leave this unset and will receive callbacks for registered events, for all connected customers, to the specified URL).",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubscriptionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/rfi/{rfiId}/responses": {
      "post": {
        "tags": [
          "RFI"
        ],
        "summary": "Submit RFI responses in bulk",
        "description": "Submits a batch of question answers and document attachments in a single atomic call. If any item fails validation the whole batch is rejected and nothing is persisted.",
        "operationId": "submitResponses",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account the RFI belongs to",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account the RFI belongs to",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          },
          {
            "name": "rfiId",
            "in": "path",
            "description": "RFI identifier",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubmitResponsesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Rfi"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/rfi/{rfiId}/questions/{questionId}/answer": {
      "post": {
        "tags": [
          "RFI"
        ],
        "summary": "Answer an RFI question",
        "description": "Submits the customer's free-text answer to a single question. Subsequent calls replace the previous answer (last-write-wins).",
        "operationId": "answerQuestion",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account the RFI belongs to",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account the RFI belongs to",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          },
          {
            "name": "rfiId",
            "in": "path",
            "description": "RFI identifier",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "questionId",
            "in": "path",
            "description": "Question identifier",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AnswerQuestionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Rfi"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/rfi/{rfiId}/documents/upload": {
      "post": {
        "tags": [
          "RFI"
        ],
        "summary": "Upload a document for an RFI",
        "description": "Uploads a file to Hubpay for use on an RFI. Returns a `DocumentUpload` whose `id` is then passed to `POST /v1/rfi/{rfiId}/document-requests/{documentRequestId}/attach` to link the upload to a document-request slot on the RFI.",
        "operationId": "uploadRfiDocument",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account the RFI belongs to",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account the RFI belongs to",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          },
          {
            "name": "rfiId",
            "in": "path",
            "description": "RFI identifier",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentUpload"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/rfi/{rfiId}/document-requests/{documentRequestId}/attach": {
      "post": {
        "tags": [
          "RFI"
        ],
        "summary": "Attach documents to an RFI document-request slot",
        "description": "Attaches one or more previously-uploaded documents to a document-request slot on the RFI. Use `POST /v1/rfi/{rfiId}/documents/upload` to push file bytes first, then pass the returned `DocumentUpload.id` values here.",
        "operationId": "attachDocuments",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account the RFI belongs to",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account the RFI belongs to",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          },
          {
            "name": "rfiId",
            "in": "path",
            "description": "RFI identifier",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "documentRequestId",
            "in": "path",
            "description": "Document-request slot identifier (matches `Rfi.documentRequests[].id`)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AttachDocumentsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Rfi"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/rfi/{rfiId}/close": {
      "post": {
        "tags": [
          "RFI"
        ],
        "summary": "Close an RFI (Sandbox)",
        "description": "**Non-production only.** Transitions the identified RFI to `CLOSED` and dispatches the\n`v1.rfi.case.closed` webhook.\n\nSee the [sandbox testing guide](/docs/guides/responding-to-rfi/testing).\n",
        "operationId": "sandboxCloseRfi",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account the RFI belongs to",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account the RFI belongs to",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          },
          {
            "name": "rfiId",
            "in": "path",
            "description": "RFI identifier",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "RFI closed; the corresponding webhook has been dispatched.",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/rfi/{rfiId}/cancel": {
      "post": {
        "tags": [
          "RFI"
        ],
        "summary": "Cancel an RFI (Sandbox)",
        "description": "**Non-production only.** Transitions the identified RFI to `CANCELLED` and dispatches the\n`v1.rfi.case.cancelled` webhook.\n\nSee the [sandbox testing guide](/docs/guides/responding-to-rfi/testing).\n",
        "operationId": "sandboxCancelRfi",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account the RFI belongs to",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account the RFI belongs to",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          },
          {
            "name": "rfiId",
            "in": "path",
            "description": "RFI identifier",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelRfiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "RFI cancelled; the corresponding webhook has been dispatched.",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/rfi/open": {
      "post": {
        "tags": [
          "RFI"
        ],
        "summary": "Open an RFI (Sandbox)",
        "description": "**Non-production only.** Opens a new RFI against the calling partner's account and\ndispatches the `v1.rfi.case.opened` webhook. The owning account is resolved from the\n`AccountId` header. Partners cannot open an RFI on another partner's account.\n\nAt least one question or one document request must be provided.\n\nSee the [sandbox testing guide](/docs/guides/responding-to-rfi/testing).\n",
        "operationId": "sandboxOpenRfi",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account on which to open the RFI",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account on which to open the RFI",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OpenRfiRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Rfi"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/rfi/documents/{documentId}/decline": {
      "post": {
        "tags": [
          "RFI"
        ],
        "summary": "Decline an RFI document (Sandbox)",
        "description": "**Non-production only.** Marks the RFI document as `DECLINED` and dispatches the\n`v1.rfi.document.declined` webhook.\n\nSee the [sandbox testing guide](/docs/guides/responding-to-rfi/testing).\n",
        "operationId": "sandboxDeclineRfiDocument",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account the RFI document belongs to",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account the RFI document belongs to",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          },
          {
            "name": "documentId",
            "in": "path",
            "description": "ID of the RFI document to decline",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Document declined; the corresponding webhook has been dispatched.",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/rfi/documents/{documentId}/approve": {
      "post": {
        "tags": [
          "RFI"
        ],
        "summary": "Approve an RFI document (Sandbox)",
        "description": "**Non-production only.** Marks the RFI document as `APPROVED` and dispatches the\n`v1.rfi.document.approved` webhook.\n\nSee the [sandbox testing guide](/docs/guides/responding-to-rfi/testing).\n",
        "operationId": "sandboxApproveRfiDocument",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account the RFI document belongs to",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account the RFI document belongs to",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          },
          {
            "name": "documentId",
            "in": "path",
            "description": "ID of the RFI document to approve",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Document approved; the corresponding webhook has been dispatched.",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/payments": {
      "post": {
        "tags": [
          "Payments"
        ],
        "summary": "Create payments",
        "description": "Initiate a new payment request with the provided details",
        "operationId": "createPayments",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedModelPayment"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/payments/quote": {
      "post": {
        "tags": [
          "Payments"
        ],
        "summary": "Create a payment quote",
        "description": "Initiate a new payment quote request with the provided details",
        "operationId": "createPaymentQuote",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentQuoteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentQuote"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/orders/exchange/quote": {
      "post": {
        "tags": [
          "Exchange"
        ],
        "summary": "Get an exchange quote",
        "description": "Retrieve a market price quote based on the provided request.",
        "operationId": "exchangeQuote",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExchangeQuoteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExchangeQuote"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/orders/exchange/confirm": {
      "post": {
        "tags": [
          "Exchange"
        ],
        "summary": "Make an order",
        "description": "Create an FX order based on the provided request.",
        "operationId": "createOrder",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ExchangeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Exchange"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/connections": {
      "get": {
        "tags": [
          "Connections"
        ],
        "summary": "List connections",
        "description": "Lists the authenticated partner's app connections",
        "operationId": "listConnections",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "description": "Zero-based page index (0..N)",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "description": "The size of the page to be returned",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "minimum": 1
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedModelConnection"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Connections"
        ],
        "summary": "Create a connection request",
        "description": "Creates a connection request for the authenticated partner and returns a deep link and token",
        "operationId": "createConnection",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConnectionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionRequestResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/collections/simulate-payment": {
      "post": {
        "tags": [
          "Sandbox simulations"
        ],
        "summary": "Simulate a payment (Sandbox)",
        "description": "Simulates a card, bank transfer or crypto payment against an existing payment request.\nThis triggers the full payment lifecycle including status updates and webhook notifications,\nwithout requiring actual bank transfers or cryptocurrency transactions.\n\nThe payment request must be in UNPAID or PART_PAID status.\nIf no amount is specified, the full remaining balance is used. Amount is in the request's\nfiat currency. To test an existing checkout crypto quote, pending deposits, split deposits\nor quote expiry, use simulate-crypto-deposit and simulate-expiry.\n\nAfter a successful simulation:\n- The payment request status will be updated to PAID (or PART_PAID for partial amounts)\n- Webhook notifications will be sent to your registered endpoints\n- The payment will be visible when querying the payment request\n- The wallet balance will be updated\n\nThis endpoint is only available in sandbox/test environments.\n",
        "operationId": "simulatePayment",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimulatePaymentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimulatePaymentResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/collections/simulate-payment-completion": {
      "post": {
        "tags": [
          "Sandbox simulations"
        ],
        "summary": "Simulate crypto payment completion (Sandbox)",
        "description": "Completes a confirmed sandbox crypto payment, from a real testnet transfer or\nsimulate-crypto-deposit. If provider settlement is absent it is simulated first, then\nthe normal completion path credits the sandbox wallet and queues payment.completed.\nIt does not create another payment or replay earlier lifecycle webhooks.\n\nEvery deposit in the quote round must be confirmed. A partially funded quote round must\nexpire before completion, even if another round has since paid the request in full.\nPART_PAID and EXPIRED requests retain their status. A running compliance check must finish\nfirst; rejected payments cannot complete. Repeating successful completion is idempotent.\n\nEligible payout instructions run through normal payout creation and approval rules.\nPayment completion does not mean the payout is complete; inspect its separate status.\nOnly available in sandbox/test environments.\n",
        "operationId": "simulatePaymentCompletion",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimulatePaymentCompletionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimulatePaymentCompletionResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/collections/simulate-expiry": {
      "post": {
        "tags": [
          "Sandbox simulations"
        ],
        "summary": "Simulate quote or checkout expiry (Sandbox)",
        "description": "Advances the selected expiry clock using the normal payment eligibility and expiry rules.\nCRYPTO_QUOTE expires the latest quote unless quotePaymentId is supplied. It does not settle funds or credit the wallet.\nPAYMENT_DEADLINE and PAYMENT_REQUEST require an expiring hosted or embedded request and\nmust omit quotePaymentId. They do not expire the crypto quote. A pending card or crypto\npayment can keep a request open past its expiry; inspect the actual response status.\nPaid or cancelled requests cannot be forced to expire. Retries never extend a clock or\nreopen a request. Available only in sandbox/test environments.\n",
        "operationId": "simulateExpiry",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimulateExpiryRequest"
              },
              "example": {
                "paymentRequestReference": "<PAYMENT_REQUEST_REFERENCE>",
                "target": "CRYPTO_QUOTE"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimulateExpiryResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/collections/simulate-payout": {
      "post": {
        "tags": [
          "Sandbox simulations"
        ],
        "summary": "Simulate a payout outcome (Sandbox)",
        "description": "Moves the payout of a completed payment one step, the way a checker or the bank would.\nAPPROVED and REJECTED act on a payout in PENDING_APPROVAL. PAID and FAILED act on a payout\nin INITIATED. A step that does not fit the payout's current status is refused with a 400 that\nnames that status. Repeating an outcome the payout has already reached returns\nalreadyProcessed: true and queues no webhook. The payment request must have been created\nwith payoutDetails and the payment must be COMPLETE. Available only in sandbox/test environments.\n",
        "operationId": "simulatePayout",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimulatePayoutRequest"
              },
              "example": {
                "paymentRequestReference": "<PAYMENT_REQUEST_REFERENCE>",
                "paymentId": "<PAYMENT_ID>",
                "outcome": "PAID"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimulatePayoutResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/collections/simulate-crypto-deposit": {
      "post": {
        "tags": [
          "Sandbox simulations"
        ],
        "summary": "Simulate a crypto deposit (Sandbox)",
        "description": "Simulates a pending or confirmed deposit against an existing checkout crypto quote using\nits token, network and rate. The payment request must belong to the selected account.\nOmit quotePaymentId to select the latest quote. Omit cryptoAmount and percentageOfRemaining\nto pay its remaining amount after pending and confirmed deposits. Alternatively supply\nan exact cryptoAmount or percentageOfRemaining, not both. New deposits require an open\nquote and an UNPAID or PART_PAID request. Reuse depositId to retry or confirm the original\ndeposit with its original quote and amount, including after expiry or a quote refresh.\nUse a new depositId for each split deposit. Total deposits cannot exceed the quote amount.\nConfirmation updates received funds and queues the normal confirmation webhooks; wallet\ncredit requires simulate-payment-completion. This does not send an on-chain transaction.\nAvailable only in sandbox/test environments with the usual collections authorization.\n",
        "operationId": "simulateCryptoDeposit",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimulateCryptoDepositRequest"
              },
              "example": {
                "paymentRequestReference": "<PAYMENT_REQUEST_REFERENCE>",
                "depositId": "<DEPOSIT_UUID>",
                "status": "CONFIRMED"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimulateCryptoDepositResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/collections/payment-requests": {
      "get": {
        "tags": [
          "Payment Requests"
        ],
        "summary": "List payment requests",
        "description": "List all payment requests for an account",
        "operationId": "getPaymentRequests",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Zero-based page index (0..N)",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "description": "The size of the page to be returned",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "minimum": 1
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedModelPaymentRequest"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Payment Requests"
        ],
        "summary": "Create payment request",
        "operationId": "createPaymentRequest",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentRequestCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequest"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/collections/payers": {
      "get": {
        "tags": [
          "Payers"
        ],
        "summary": "List payers",
        "description": "List all payers for an account",
        "operationId": "getPayers",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Zero-based page index (0..N)",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "description": "The size of the page to be returned",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "minimum": 1
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedModelPayer"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Payers"
        ],
        "summary": "Create payer",
        "operationId": "createPayer",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PayerCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payer"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/collections/documents/upload": {
      "post": {
        "tags": [
          "Payment Requests"
        ],
        "summary": "Upload document",
        "description": "Hubpay requires an official document (such as an Invoice, Purchase Order, Sales Purchase Agreement, Commercial Contract etc.) to verify the transaction details and ensure compliance with UAE regulatory requirements.",
        "operationId": "upload",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentUpload"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/beneficiaries": {
      "get": {
        "tags": [
          "Beneficiaries"
        ],
        "summary": "Lists beneficiaries",
        "description": "Get a list of beneficiaries for the account",
        "operationId": "listBeneficiaries",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "accountNumber",
            "in": "query",
            "description": "Optional query param to filter by accountNumber (bank account number or iban of a beneficiary)",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Optional query param to filter by accountNumber (bank account number or iban of a beneficiary)"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Zero-based page index (0..N)",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "description": "The size of the page to be returned",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "minimum": 1
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedModelBeneficiary"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Beneficiaries"
        ],
        "summary": "Create beneficiary",
        "description": "Create beneficiary",
        "operationId": "createBeneficiary",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BeneficiaryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Beneficiary"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/account": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get account",
        "description": "Gets account summary",
        "operationId": "getAccount",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Create account",
        "description": "Creates an account to onboard an entity with Hubpay",
        "operationId": "createAccount",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/account/users/invite": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Invite user",
        "description": "Create an invite for a user to join the account. The invited user completes a self sign-up process and sets up their own credentials. The account must be in **APPLICATION_APPROVED** or **ACTIVE** status. See the [**Users integration guide**](/docs/guides/accounts/users) for more details.",
        "operationId": "createInvite",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInviteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateInviteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/account/users/invite/{inviteId}/resend": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Resend invite",
        "description": "Resending revokes the old token and creates a new invite URL",
        "operationId": "resendInvite",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          },
          {
            "name": "inviteId",
            "in": "path",
            "description": "Unique identifier of the invite",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier of the invite",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateInviteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/account/related-party/persons": {
      "get": {
        "tags": [
          "Persons"
        ],
        "summary": "Get all persons",
        "description": "Get all persons related to the business account",
        "operationId": "getAllPersons",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          },
          {
            "name": "page",
            "in": "query",
            "description": "Zero-based page index",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0,
              "description": "Zero-based page index",
              "example": 0
            },
            "example": 0
          },
          {
            "name": "size",
            "in": "query",
            "description": "Page size",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20,
              "description": "Page size",
              "example": 20
            },
            "example": 20
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedModelRelatedPerson"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Persons"
        ],
        "summary": "Add person",
        "description": "For business accounts - add details of Shareholders, Directors and Authorised Signatories<br/><ul><li><b>Shareholders</b>: Individuals who hold shares in the company</li><li><b>Directors</b>: People legally responsible for managing the company's operations and decision-making</li><li><b>Authorised Signatories</b>: Individuals who have the authority to sign documents and make official commitments on behalf of the company</li></ul>",
        "operationId": "addPerson",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RelatedPersonRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RelatedPerson"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/account/related-party/corporates": {
      "get": {
        "tags": [
          "Corporates"
        ],
        "summary": "Get all corporates",
        "description": "Get all corporate entities related to the business account",
        "operationId": "getAllCorporates",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          },
          {
            "name": "page",
            "in": "query",
            "description": "Zero-based page index",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0,
              "description": "Zero-based page index",
              "example": 0
            },
            "example": 0
          },
          {
            "name": "size",
            "in": "query",
            "description": "Page size",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20,
              "description": "Page size",
              "example": 20
            },
            "example": 20
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedModelRelatedCorporate"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Corporates"
        ],
        "summary": "Add corporate",
        "description": "Add a corporate entity related to the business account.<br/><ul><li><b>Parent</b>: A company that owns or controls the business being onboarded</li><li><b>Subsidiary</b>: A company that is owned or controlled by the business being onboarded</li></ul>",
        "operationId": "addCorporate",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RelatedCorporateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RelatedCorporate"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/account/reject": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Reject account (Sandbox)",
        "description": "**Non-production only.** Transitions the account to `DECLINED` and dispatches the\n`v1.onboarding.account.rejected` webhook. Can be called at any point in the\nonboarding flow.\n\nSee the [sandbox onboarding guide](/docs/guides/accounts/testing/simulating-onboarding).\n",
        "operationId": "sandboxRejectAccount",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/account/documents": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Get all account documents",
        "description": "Get submitted documents and their status",
        "operationId": "listDocuments",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDocumentsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Add/update document",
        "description": "Add/update a document by type. If the document already exists, it will be updated with the new file. If the document does not exist, it will be created.",
        "operationId": "submitDocument",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountDocumentRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountDocument"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/account/documents/{documentId}/decline": {
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Decline document (Sandbox)",
        "description": "**Non-production only.** Marks the KYB onboarding document as `DECLINED` and\ndispatches the `v1.onboarding.document.declined` webhook.\n\nSee the [sandbox onboarding guide](/docs/guides/accounts/testing/simulating-onboarding).\n",
        "operationId": "sandboxDeclineDocument",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          },
          {
            "name": "documentId",
            "in": "path",
            "description": "ID of the document to decline",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "ID of the document to decline"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Document declined; the corresponding webhook has been dispatched.",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/account/documents/{documentId}/approve": {
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Approve document (Sandbox)",
        "description": "**Non-production only.** Marks the KYB onboarding document as `APPROVED` and\ndispatches the `v1.onboarding.document.approved` webhook.\n\nSee the [sandbox onboarding guide](/docs/guides/accounts/testing/simulating-onboarding).\n",
        "operationId": "sandboxApproveDocument",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          },
          {
            "name": "documentId",
            "in": "path",
            "description": "ID of the document to approve",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "ID of the document to approve"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Document approved; the corresponding webhook has been dispatched.",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/account/documents/{documentId}/acknowledge": {
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Acknowledge document validation warnings",
        "description": "Acknowledges validation warnings on a document and moves it to manual review. The document must be in **VALIDATION_WARNINGS** status. Use this when the customer has reviewed the automated warning and confirms the document is correct.",
        "operationId": "acknowledgeDocumentWarnings",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          },
          {
            "name": "documentId",
            "in": "path",
            "description": "ID of the document to acknowledge warnings for",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "ID of the document to acknowledge warnings for"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApprovableDocument"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/account/documents/upload": {
      "post": {
        "tags": [
          "Documents"
        ],
        "summary": "Upload document",
        "description": "Stores a document used for onboarding, RFIs, or other activities",
        "operationId": "uploadDocument",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentUpload"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/account/approve": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Approve account (Sandbox)",
        "description": "**Non-production only.** Transitions the account to `APPLICATION_APPROVED` and\ndispatches the `v1.onboarding.account.approved` webhook. The account must be in\n`APPLICATION_SUBMITTED` status. Call [confirm submission](/docs/guides/accounts/confirm-submission)\nfirst.\n\nSee the [sandbox onboarding guide](/docs/guides/accounts/testing/simulating-onboarding).\n",
        "operationId": "sandboxApproveAccount",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/auth/token": {
      "post": {
        "tags": [
          "Authentication"
        ],
        "summary": "Generate JWT access token",
        "description": "Authenticates a registered client using its ID and secret, and returns a JWT access token.",
        "operationId": "getAccessToken",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AuthRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful token issuance",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AuthResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "401": {
            "description": "Invalid client credentials",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetail"
                }
              }
            }
          }
        },
        "security": []
      }
    },
    "/v1/webhooks/{webhookId}/signing-secret": {
      "get": {
        "tags": [
          "Webhook management"
        ],
        "summary": "Get webhook signing secret",
        "description": "Retrieve the signing secret for a registered webhook. Use this secret to verify incoming webhook payload signatures.",
        "operationId": "getWebhookSigningSecret",
        "parameters": [
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SigningSecretResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/wallets": {
      "get": {
        "tags": [
          "Wallets"
        ],
        "summary": "List wallets and balances",
        "description": "Returns wallets and their available balances",
        "operationId": "listWalletsWithBalance",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "description": "Optional query param to filter by currency",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Optional query param to filter by currency",
              "example": "AED",
              "pattern": "[A-Z]{3}"
            },
            "example": "AED"
          },
          {
            "name": "page",
            "in": "query",
            "description": "Zero-based page index (0..N)",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "description": "The size of the page to be returned",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "minimum": 1
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedModelWalletBalance"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/transactions": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "summary": "Get all account transactions",
        "description": "Retrieve a paged list of all account transactions.",
        "operationId": "getAccountTransactions",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedModelTransaction"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/transactions/{id}": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "summary": "Get a single transaction",
        "description": "Retrieve a single transaction by id",
        "operationId": "getAccountTransaction",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/rfi": {
      "get": {
        "tags": [
          "RFI"
        ],
        "summary": "List RFIs",
        "description": "Returns RFI cases raised against the account. By default only OPEN RFIs are returned; set `includeTerminal=true` to also include CLOSED and CANCELLED cases.",
        "operationId": "listRfis",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account the RFIs belong to",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account the RFIs belong to",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          },
          {
            "name": "includeTerminal",
            "in": "query",
            "description": "If true, includes CLOSED and CANCELLED RFIs alongside OPEN ones. Defaults to false.",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RfiSummary"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/rfi/{rfiId}": {
      "get": {
        "tags": [
          "RFI"
        ],
        "summary": "Get RFI",
        "description": "Returns the full RFI case, including questions and document requests.",
        "operationId": "getRfi",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account the RFI belongs to",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account the RFI belongs to",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          },
          {
            "name": "rfiId",
            "in": "path",
            "description": "RFI identifier",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Rfi"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/payments/{id}": {
      "get": {
        "tags": [
          "Payments"
        ],
        "summary": "Get a payment",
        "description": "Retrieve a single payment by id",
        "operationId": "getPayment",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Payment"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/orders/exchange/{id}": {
      "get": {
        "tags": [
          "Exchange"
        ],
        "summary": "Lookup an exchange by ID",
        "operationId": "lookupExchange",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Unique identifier of the exchange",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier of the exchange",
              "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            },
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Exchange"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/funding-accounts": {
      "get": {
        "tags": [
          "Funding accounts"
        ],
        "summary": "Retrieve funding accounts per currency",
        "operationId": "getFundingAccounts",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "description": "Required query param to filter funding accounts by currency",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Required query param to filter funding accounts by currency",
              "example": "AED",
              "pattern": "[A-Z]{3}"
            },
            "example": "AED"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FundingAccountDetails"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/connections/{connectionId}": {
      "get": {
        "tags": [
          "Connections"
        ],
        "summary": "Get connection",
        "description": "Fetches one of the authenticated partner's app connections",
        "operationId": "getConnection",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "description": "Unique identifier of the connection",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier of the connection",
              "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            },
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Connection"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Connections"
        ],
        "summary": "Revoke connection",
        "description": "Revokes one of the authenticated partner's app connections",
        "operationId": "revokeConnection",
        "parameters": [
          {
            "name": "connectionId",
            "in": "path",
            "description": "Unique identifier of the connection",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier of the connection",
              "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            },
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/collections/rates": {
      "get": {
        "tags": [
          "Rates"
        ],
        "summary": "Get Exchange rates",
        "description": "Use the Get Exchange rates endpoint to retrieve indicative exchange rates for a specific collection type",
        "operationId": "createCollectionQuote",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sourceType",
            "in": "query",
            "description": "Source type: FIAT or CRYPTO",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Source type: FIAT or CRYPTO",
              "enum": [
                "FIAT",
                "CRYPTO"
              ]
            }
          },
          {
            "name": "sourceCurrency",
            "in": "query",
            "description": "Currency the payer will send (fiat or crypto)",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Currency the payer will send (fiat or crypto)",
              "example": "AED",
              "pattern": "[A-Z]{3,5}"
            },
            "example": "AED"
          },
          {
            "name": "sourceCountry",
            "in": "query",
            "description": "Country of the payer",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Country of the payer",
              "example": "GB"
            },
            "example": "GB"
          },
          {
            "name": "destinationType",
            "in": "query",
            "description": "Payment type: FIAT or CRYPTO",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Payment type: FIAT or CRYPTO",
              "enum": [
                "FIAT",
                "CRYPTO"
              ]
            }
          },
          {
            "name": "destinationCurrency",
            "in": "query",
            "description": "Currency of the collection. This is the amount credited to the destination account",
            "required": true,
            "schema": {
              "type": "string",
              "description": "Currency of the collection. This is the amount credited to the destination account",
              "example": "AED",
              "pattern": "[A-Z]{3,5}"
            },
            "example": "AED"
          },
          {
            "name": "destinationAmount",
            "in": "query",
            "description": "Collection amount to be received in the destination currency",
            "required": true,
            "schema": {
              "type": "number",
              "description": "Collection amount to be received in the destination currency",
              "example": 1000.0,
              "minimum": 0.01
            },
            "example": 1000.0
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CollectionRate"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/collections/payment-requests/{id}": {
      "get": {
        "tags": [
          "Payment Requests"
        ],
        "summary": "Get a payment request by ID",
        "description": "Retrieve a single payment request by id",
        "operationId": "getPaymentRequest",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "id",
            "in": "path",
            "description": "Unique identifier of the payment request",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier of the payment request",
              "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            },
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequest"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/collections/payment-requests/payments/{paymentId}": {
      "get": {
        "tags": [
          "Payment Requests"
        ],
        "summary": "Get a specific payment",
        "description": "Get a specific payment under a payment request",
        "operationId": "getPaymentForPaymentRequest",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "paymentId",
            "in": "path",
            "description": "Unique identifier of the payment",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier of the payment",
              "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
            },
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequestPayment"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/collections/payment-requests/payments/{paymentId}/receipts": {
      "get": {
        "tags": [
          "Receipts"
        ],
        "summary": "List payment receipts",
        "description": "Retrieve all receipts uploaded by payers for a specific payment. Currently supports bank transfer proof-of-payment documents (e.g., bank transfer screenshots, payment confirmations) that payers optionally upload when completing a payment via the payment link or hosted payment page. Only available for payments where the payer chose to include a receipt.",
        "operationId": "getPaymentReceipts",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "paymentId",
            "in": "path",
            "description": "Unique identifier of the payment",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier of the payment",
              "example": "b0ae5614-2494-49fa-b075-8050b5eb84ba"
            },
            "example": "b0ae5614-2494-49fa-b075-8050b5eb84ba"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentReceiptList"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/collections/payment-requests/payments/{paymentId}/receipts/{receiptId}/download": {
      "get": {
        "tags": [
          "Receipts"
        ],
        "summary": "Download payment receipt",
        "description": "Download a specific receipt file uploaded by a payer. Currently supports bank transfer proof-of-payment documents (e.g., bank transfer screenshots, payment confirmations) that payers optionally upload when completing a payment via the payment link or hosted payment page.",
        "operationId": "downloadPaymentReceipt",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "paymentId",
            "in": "path",
            "description": "Unique identifier of the payment",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier of the payment",
              "example": "b0ae5614-2494-49fa-b075-8050b5eb84ba"
            },
            "example": "b0ae5614-2494-49fa-b075-8050b5eb84ba"
          },
          {
            "name": "receiptId",
            "in": "path",
            "description": "Unique identifier of the receipt",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier of the receipt",
              "example": "550e8400-e29b-41d4-a716-446655440001"
            },
            "example": "550e8400-e29b-41d4-a716-446655440001"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/collections/payment-requests/find": {
      "get": {
        "tags": [
          "Payment Requests"
        ],
        "summary": "Find payment requests by external ID",
        "description": "Find payment requests for an account by external ID",
        "operationId": "findPaymentRequests",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Zero-based page index (0..N)",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "description": "The size of the page to be returned",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "minimum": 1
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "externalId",
            "in": "query",
            "description": "External ID to search for",
            "required": true,
            "schema": {
              "type": "string",
              "description": "External ID to search for",
              "example": "EXT-001",
              "minLength": 1
            },
            "example": "EXT-001"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedModelPaymentRequest"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/collections/payers/find": {
      "get": {
        "tags": [
          "Payers"
        ],
        "summary": "Find payers by external ID",
        "description": "Find payers for an account by external ID",
        "operationId": "findPayers",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Zero-based page index (0..N)",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "description": "The size of the page to be returned",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "minimum": 1
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "externalId",
            "in": "query",
            "description": "External ID to search for",
            "required": true,
            "schema": {
              "type": "string",
              "description": "External ID to search for",
              "example": "EXT-001",
              "minLength": 1
            },
            "example": "EXT-001"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedModelPayer"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/beneficiaries/find": {
      "get": {
        "tags": [
          "Beneficiaries"
        ],
        "summary": "Find beneficiaries by external ID",
        "description": "Find beneficiaries for an account by external ID",
        "operationId": "findBeneficiaries",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Zero-based page index (0..N)",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0,
              "minimum": 0
            }
          },
          {
            "name": "size",
            "in": "query",
            "description": "The size of the page to be returned",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 20,
              "minimum": 1
            }
          },
          {
            "name": "sort",
            "in": "query",
            "description": "Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            }
          },
          {
            "name": "externalId",
            "in": "query",
            "description": "External ID to search for",
            "required": true,
            "schema": {
              "type": "string",
              "description": "External ID to search for",
              "example": "EXT-001",
              "minLength": 1
            },
            "example": "EXT-001"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedModelBeneficiary"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/account/users": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "List users",
        "description": "Get all active users linked to the account",
        "operationId": "listUsers",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/User"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/account/users/invite/{inviteId}": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get invite",
        "description": "Get invite details including invite URL and status",
        "operationId": "getInvite",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          },
          {
            "name": "inviteId",
            "in": "path",
            "description": "Unique identifier of the invite",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "description": "Unique identifier of the invite",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InviteResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/account/list": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Get all accounts",
        "description": "Get all accounts created by the partner",
        "operationId": "listAccounts",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "description": "Filter by account status",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Represents the current onboarding and operational status of the account",
              "enum": [
                "CREATED",
                "APPLICATION_IN_PROGRESS",
                "APPLICATION_SUBMITTED",
                "APPLICATION_APPROVED",
                "ACTIVE",
                "DECLINED",
                "SUSPENDED",
                "CLOSED"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "description": "Zero-based page index",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 0,
              "description": "Zero-based page index",
              "example": 0
            },
            "example": 0
          },
          {
            "name": "size",
            "in": "query",
            "description": "Page size (max 50)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 20,
              "description": "Page size (max 50)",
              "example": 20
            },
            "example": 20
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PagedModelAccount"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/account/documents/required": {
      "get": {
        "tags": [
          "Documents"
        ],
        "summary": "Get document requirements",
        "description": "Lists required documents for the account and their status",
        "operationId": "getDocumentRequirements",
        "parameters": [
          {
            "name": "AccountId",
            "in": "header",
            "description": "ID of account for which operation is to be performed",
            "required": true,
            "schema": {
              "type": "string",
              "description": "ID of account for which operation is to be performed",
              "example": "e038b313-0b04-48d3-867e-7fee463501db"
            },
            "example": "e038b313-0b04-48d3-867e-7fee463501db"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentRequirementsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    },
    "/v1/webhooks/{webhookId}": {
      "delete": {
        "tags": [
          "Webhook management"
        ],
        "summary": "Delete a registered webhook",
        "description": "Removes a previously registered webhook by its unique identifier",
        "operationId": "deleteWebhook",
        "parameters": [
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "405": {
            "description": "Method Not Allowed",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "415": {
            "description": "Unsupported Media Type",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "headers": {
              "X-Trace-Id": {
                "$ref": "#/components/headers/TraceId"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "Authorization": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ApiErrorResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Stable machine-readable code",
            "enum": [
              "validation_failed",
              "unauthorized",
              "forbidden",
              "not_found",
              "conflict",
              "internal_error",
              "operation_unavailable"
            ],
            "example": "validation_failed"
          },
          "message": {
            "type": "string",
            "example": "One or more fields are missing or invalid"
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "example": 400
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "example": "2025-06-10T10:15:31Z"
          },
          "path": {
            "type": "string",
            "example": "/v1/collections/rates"
          },
          "traceId": {
            "type": "string",
            "description": "Trace ID to provide when contacting Hubpay support",
            "example": "0af7651916cd43dd8448eb211c80319c"
          },
          "errors": {
            "type": "array",
            "description": "Field-level validation errors",
            "items": {
              "$ref": "#/components/schemas/FieldError"
            }
          }
        }
      },
      "FieldError": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "example": "sourceCurrency"
          },
          "message": {
            "type": "string",
            "example": "Source currency is required"
          }
        }
      },
      "PaymentRequest": {
        "type": "object",
        "description": "Details of a payment request",
        "properties": {
          "executionMode": {
            "type": "string",
            "description": "How the payer completes the payment: PAYMENT_LINK is shareable, HOSTED_PAGE is a standalone Hubpay page, and EMBEDDED is compact checkout contained in a website iframe or direct native WebView",
            "enum": [
              "PAYMENT_LINK",
              "HOSTED_PAGE",
              "EMBEDDED"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "System-generated unique identifier for the payment request"
          },
          "externalId": {
            "type": "string",
            "description": "Client-provided identifier for the payment request, used for idempotency or external reference",
            "maxLength": 36,
            "minLength": 0
          },
          "accountId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the account associated with this payment request"
          },
          "payerId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the payer"
          },
          "currency": {
            "type": "string",
            "description": "Three-letter ISO or crypto currency code for settlement",
            "example": "AED",
            "minLength": 1,
            "pattern": "[A-Z]{3,5}"
          },
          "amount": {
            "type": "number",
            "description": "Amount to be received in the specified currency",
            "example": 150.0
          },
          "dueDate": {
            "type": "string",
            "format": "date",
            "description": "Optional due date by which the payment should be made"
          },
          "expiresAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "The deadline for a HOSTED_PAGE or EMBEDDED payment request, set to 60 minutes after the request is\ncreated. The request normally expires at this time, but the two cases below can make it expire\nearlier or later. Null for PAYMENT_LINK requests, which never expire.\n\nThe payer can start a payment until 15 minutes before this time. If the payer has not taken a quote\nor started a card or bank payment by then, the request expires at that earlier time.\n\nAt this time, a request that is still UNPAID or PART_PAID becomes EXPIRED and the\npayment_request.expired webhook is sent. One exception: if a crypto deposit was sent in time and is\nstill confirming, the request stays open until the deposit settles. It then becomes PAID if the\ndeposit covers the full amount, or EXPIRED if it does not.\n",
            "example": "2026-09-15T11:00:00Z"
          },
          "documentReference": {
            "type": "string",
            "description": "Document reference such as an invoice number or PO reference",
            "minLength": 1
          },
          "documentId": {
            "type": "string",
            "format": "uuid",
            "description": "Internal document UUID associated with this payment request"
          },
          "paymentMethods": {
            "type": "array",
            "description": "List of permitted payment methods (e.g., CARD, BANK_TRANSFER, CRYPTO)",
            "items": {
              "type": "string",
              "enum": [
                "CARD",
                "BANK_TRANSFER",
                "CRYPTO"
              ]
            },
            "minItems": 1
          },
          "status": {
            "type": "string",
            "description": "Status of the payment request (e.g., PENDING, PAID, CANCELLED)",
            "enum": [
              "PAID",
              "PART_PAID",
              "UNPAID",
              "CANCELLED",
              "EXPIRED"
            ]
          },
          "paymentLinkReference": {
            "type": "string",
            "description": "Internal reference ID linking to the payment URL"
          },
          "paymentUrl": {
            "type": "string",
            "description": "Public URL where the payer can complete the payment"
          },
          "successRedirectUrl": {
            "type": "string",
            "description": "URL to redirect the payer when they have successfully completed their payment journey.\n\n**Important:** This redirect does NOT confirm that funds have been received. For asynchronous\npayment methods like bank transfers, the payer may have successfully submitted payment\ninstructions, but funds may not yet be received by Hubpay.\n\n**Always verify payment status** via webhooks or API lookup before fulfilling orders or\nproviding services.\n\nHubpay will append `paymentRequestId` and `paymentId` as query parameters to this URL\nduring the **redirect flow only**. They are not included in the API response payload.\n"
          },
          "cancelRedirectUrl": {
            "type": "string",
            "description": "URL the payer is returned to when they cancel or leave the payment page, or when a hosted payment request expires unpaid. Arrival is not proof of cancellation; verify the request status via webhook or API."
          },
          "autoSendPaymentLink": {
            "type": "boolean",
            "description": "Whether the payment link was automatically sent to the payer's email address upon creation"
          },
          "payoutDetails": {
            "$ref": "#/components/schemas/PayoutDetails",
            "description": "Details for payout to a beneficiary.\nIf this is provided then evey payment made against this request will be paid out to the provided beneficiary\n"
          },
          "amountPaid": {
            "type": "number",
            "description": "Total amount paid against this payment request",
            "example": 50.0
          },
          "amountRemaining": {
            "type": "number",
            "description": "Remaining amount to be paid",
            "example": 100.0
          },
          "payments": {
            "type": "array",
            "description": "List of payments made against this payment request",
            "items": {
              "$ref": "#/components/schemas/PaymentRequestPayment"
            }
          }
        },
        "required": [
          "accountId",
          "amount",
          "currency",
          "documentReference",
          "executionMode",
          "externalId",
          "id",
          "payerId",
          "paymentMethods",
          "status"
        ]
      },
      "PaymentRequestBankTransferPayment": {
        "type": "object",
        "description": "Bank transfer details",
        "properties": {
          "bankReference": {
            "type": "string",
            "description": "Bank reference number for the payment",
            "example": "123456789"
          },
          "senderAccountNumber": {
            "type": "string",
            "description": "Sender's account number",
            "example": "GB29NWBK60161331926819"
          },
          "senderName": {
            "type": "string",
            "description": "Sender's name",
            "example": "John Doe"
          }
        }
      },
      "PaymentRequestCardPayment": {
        "type": "object",
        "description": "Card details",
        "properties": {
          "issuer": {
            "type": "string",
            "description": "Card issuer"
          },
          "issuerCountry": {
            "type": "string",
            "description": "Country of the card issuer"
          },
          "scheme": {
            "type": "string",
            "description": "Card scheme",
            "example": "VISA"
          },
          "cardType": {
            "type": "string",
            "description": "Card type",
            "example": "CREDIT"
          },
          "last4": {
            "type": "string"
          }
        }
      },
      "PaymentRequestCryptoPayment": {
        "type": "object",
        "description": "Crypto details",
        "properties": {
          "transactionHash": {
            "type": "string",
            "description": "Transaction hash for the crypto payment",
            "example": "0x5c69bee701ef814a2b6a3f8d1e4f7b8c9e1f5c6d7e8f9a0b1c2d3e4f5g6h7i8j"
          }
        }
      },
      "PaymentRequestPayment": {
        "type": "object",
        "description": "Unified payment object with method-specific details",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the payment",
            "example": "123e4567-e89b-12d3-a456-426614174000"
          },
          "reference": {
            "type": "string",
            "description": "Reference for the payment",
            "example": "REF123"
          },
          "status": {
            "type": "string",
            "description": "Status of the payment",
            "enum": [
              "CREATED",
              "PENDING",
              "RECEIVED",
              "COMPLETE",
              "FAILED",
              "REVERSED"
            ],
            "example": "PENDING"
          },
          "sendCurrency": {
            "type": "string",
            "description": "Currency the payer sends in (crypto code for crypto payments, fiat code for card/bank)",
            "example": "USDT"
          },
          "sendAmount": {
            "type": "number",
            "description": "Amount the payer sends, in sendCurrency",
            "example": 272.48
          },
          "receiveCurrency": {
            "type": "string",
            "description": "Currency the merchant receives in",
            "example": "AED"
          },
          "receiveAmount": {
            "type": "number",
            "description": "Amount the merchant receives, in receiveCurrency",
            "example": 1000.0
          },
          "method": {
            "type": "string",
            "description": "Payment method used for the transaction",
            "enum": [
              "CARD",
              "BANK_TRANSFER",
              "CRYPTO"
            ],
            "example": "BANK_TRANSFER"
          },
          "accountId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the account",
            "example": "123e4567-e89b-12d3-a456-426614174004"
          },
          "payerId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the payer",
            "example": "123e4567-e89b-12d3-a456-426614174001"
          },
          "paymentRequestId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the payment request",
            "example": "123e4567-e89b-12d3-a456-426614174002"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the payment was created",
            "example": "2023-10-01T12:00:00Z"
          },
          "details": {
            "$ref": "#/components/schemas/PaymentRequestPaymentDetails",
            "description": "Details depending on payment method",
            "oneOf": [
              {
                "$ref": "#/components/schemas/PaymentRequestCardPayment"
              },
              {
                "$ref": "#/components/schemas/PaymentRequestCryptoPayment"
              },
              {
                "$ref": "#/components/schemas/PaymentRequestBankTransferPayment"
              }
            ]
          },
          "payout": {
            "$ref": "#/components/schemas/PaymentRequestPaymentPayout"
          }
        }
      },
      "PaymentRequestPaymentDetails": {
        "discriminator": {
          "propertyName": "type"
        },
        "oneOf": [
          {
            "$ref": "#/components/schemas/PaymentRequestCardPayment"
          },
          {
            "$ref": "#/components/schemas/PaymentRequestCryptoPayment"
          },
          {
            "$ref": "#/components/schemas/PaymentRequestBankTransferPayment"
          }
        ]
      },
      "PaymentRequestPaymentPayout": {
        "type": "object",
        "properties": {
          "beneficiaryId": {
            "type": "string",
            "format": "uuid"
          },
          "reference": {
            "type": "string"
          },
          "transactionReference": {
            "type": "string"
          },
          "purposeOfPayment": {
            "type": "string",
            "enum": [
              "COMPUTER_SERVICES",
              "FAMILY_SUPPORT",
              "EDUCATION",
              "MEDICAL_TREATMENT",
              "MAINTENANCE_EXPENSES",
              "TRAVEL",
              "SMALL_VALUE_REMITTANCE",
              "CONSTRUCTION_EXPENSES",
              "HOTEL_ACCOMMODATION",
              "ADVERTISING_EXPENSES",
              "ADVISORY_FEES",
              "BUSINESS_INSURANCE",
              "INSURANCE_CLAIMS",
              "DELIVERY_FEES",
              "EXPORTED_GOODS",
              "SERVICE_CHARGES",
              "LOAN_PAYMENT",
              "OFFICE_EXPENSES",
              "PROPERTY_PURCHASE",
              "PROPERTY_RENTAL",
              "ROYALTY_FEES",
              "SHARES_INVESTMENT",
              "FUND_INVESTMENT",
              "TAX_PAYMENT",
              "TRANSPORTATION_FEES",
              "UTILITY_BILLS",
              "PERSONAL_TRANSFER",
              "SALARY_PAYMENT",
              "INFLUENCER_PAYMENT",
              "DIVIDEND_PAYMENT",
              "REWARD_PAYMENT",
              "OTHER_FEES",
              "OTHER"
            ]
          },
          "amount": {
            "type": "number"
          },
          "currency": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "description": "Status of a payment payout during its lifecycle.",
            "enum": [
              "PENDING_APPROVAL",
              "INITIATED",
              "PAID",
              "FAILED"
            ]
          }
        }
      },
      "PayoutDetails": {
        "type": "object",
        "description": "Payout details for a payment request",
        "properties": {
          "payoutBeneficiaryId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the payout beneficiary"
          },
          "payoutReference": {
            "type": "string",
            "description": "Reference for the payout, such as an invoice number or transaction ID",
            "maxLength": 255,
            "minLength": 0
          },
          "payoutPurposeOfPayment": {
            "type": "string",
            "description": "Purpose of the payout, indicating the reason for the payment to the beneficiary",
            "enum": [
              "COMPUTER_SERVICES",
              "FAMILY_SUPPORT",
              "EDUCATION",
              "MEDICAL_TREATMENT",
              "MAINTENANCE_EXPENSES",
              "TRAVEL",
              "SMALL_VALUE_REMITTANCE",
              "CONSTRUCTION_EXPENSES",
              "HOTEL_ACCOMMODATION",
              "ADVERTISING_EXPENSES",
              "ADVISORY_FEES",
              "BUSINESS_INSURANCE",
              "INSURANCE_CLAIMS",
              "DELIVERY_FEES",
              "EXPORTED_GOODS",
              "SERVICE_CHARGES",
              "LOAN_PAYMENT",
              "OFFICE_EXPENSES",
              "PROPERTY_PURCHASE",
              "PROPERTY_RENTAL",
              "ROYALTY_FEES",
              "SHARES_INVESTMENT",
              "FUND_INVESTMENT",
              "TAX_PAYMENT",
              "TRANSPORTATION_FEES",
              "UTILITY_BILLS",
              "PERSONAL_TRANSFER",
              "SALARY_PAYMENT",
              "INFLUENCER_PAYMENT",
              "DIVIDEND_PAYMENT",
              "REWARD_PAYMENT",
              "OTHER_FEES",
              "OTHER"
            ]
          }
        },
        "required": [
          "payoutBeneficiaryId",
          "payoutPurposeOfPayment",
          "payoutReference"
        ]
      },
      "PayerUpdateRequest": {
        "type": "object",
        "properties": {
          "emailAddress": {
            "type": "string",
            "format": "email",
            "description": "Email address of the payer. Optional. Required to refresh the payment session for a crypto-enabled payment request.",
            "maxLength": 255,
            "minLength": 0
          },
          "phoneNumber": {
            "type": "string",
            "description": "Required if payer is crypto enabled",
            "maxLength": 255,
            "minLength": 0
          },
          "notificationEnabled": {
            "type": "boolean",
            "description": "Enable to send transaction-update emails to this payer"
          },
          "address": {
            "type": "string",
            "description": "Required if payer is crypto enabled",
            "maxLength": 255,
            "minLength": 0
          },
          "areaOrCity": {
            "type": "string",
            "description": "Required if payer is crypto enabled and type INDIVIDUAL",
            "maxLength": 255,
            "minLength": 0
          },
          "provinceOrState": {
            "type": "string",
            "description": "Required if payer is crypto enabled and type BUSINESS",
            "maxLength": 255,
            "minLength": 0
          },
          "postalCode": {
            "type": "string",
            "description": "Required for a crypto-enabled BUSINESS payer outside the UAE. Optional when the payer country is AE. Leave it blank if not applicable; do not send N/A or a made-up postcode.",
            "maxLength": 255,
            "minLength": 0
          },
          "registrationNumber": {
            "type": "string",
            "description": "Optional corporate registration number for a BUSINESS payer. Supply it when known for a crypto-enabled payer to avoid requesting it during checkout.",
            "maxLength": 255,
            "minLength": 0
          },
          "identificationDocumentType": {
            "type": "string",
            "description": "Optional identification document type for an INDIVIDUAL payer. Supply it when known for a crypto-enabled payer to avoid requesting it during checkout. Must be provided with `identificationDocumentNumber`.",
            "enum": [
              "NATIONAL_ID",
              "PASSPORT",
              "DRIVING_LICENSE"
            ]
          },
          "identificationDocumentNumber": {
            "type": "string",
            "description": "Optional identification document number for an INDIVIDUAL payer. Supply it when known for a crypto-enabled payer to avoid requesting it during checkout. Must be provided with `identificationDocumentType`.",
            "maxLength": 255,
            "minLength": 0
          },
          "cryptoEnabled": {
            "type": "boolean",
            "description": "Set to true to allow this payer to make cryptocurrency payments"
          }
        },
        "required": [
          "cryptoEnabled"
        ]
      },
      "Payer": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "externalId": {
            "type": "string",
            "minLength": 1
          },
          "accountId": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "enum": [
              "INDIVIDUAL",
              "BUSINESS"
            ]
          },
          "fullLegalName": {
            "type": "string",
            "minLength": 1
          },
          "emailAddress": {
            "type": [
              "string",
              "null"
            ]
          },
          "phoneNumber": {
            "type": "string"
          },
          "country": {
            "type": "string",
            "minLength": 1
          },
          "notificationEnabled": {
            "type": "boolean"
          },
          "address": {
            "type": "string"
          },
          "areaOrCity": {
            "type": "string"
          },
          "provinceOrState": {
            "type": "string"
          },
          "postalCode": {
            "type": "string"
          },
          "registrationNumber": {
            "type": "string"
          },
          "identificationDocumentType": {
            "type": "string",
            "description": "Identification document type for an individual crypto payer",
            "enum": [
              "NATIONAL_ID",
              "PASSPORT",
              "DRIVING_LICENSE"
            ]
          },
          "identificationDocumentNumber": {
            "type": "string"
          },
          "cryptoEnabled": {
            "type": "boolean"
          },
          "acceptedPaymentTerms": {
            "type": "boolean",
            "description": "Whether this payer has accepted the payment terms shown on the Hubpay checkout"
          },
          "paymentTermsAcceptedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When this payer accepted the payment terms. Absent if they never have",
            "example": "2023-01-01T00:00:00Z"
          }
        },
        "required": [
          "acceptedPaymentTerms",
          "accountId",
          "country",
          "cryptoEnabled",
          "externalId",
          "fullLegalName",
          "id",
          "type"
        ]
      },
      "BeneficiaryBankDetails": {
        "type": "object",
        "properties": {
          "accountNumber": {
            "type": "string",
            "description": "Beneficiary's account number, this is expected to be an iban if the bankCountry is an iban country"
          },
          "bic": {
            "type": "string",
            "description": "Beneficiary's bank identifier code, such as BIC or SWIFT"
          },
          "bankCode": {
            "type": "string",
            "description": "Code of the beneficiary's bank",
            "example": "BANK123"
          },
          "currency": {
            "type": "string",
            "description": "Currency of the beneficiary's bank account. Currently only AED is supported via the API. For other currencies, please use the HubPay corporate portal.",
            "example": "AED"
          },
          "bankName": {
            "type": "string",
            "description": "Name of the beneficiary's bank"
          },
          "bankBranchName": {
            "type": "string",
            "description": "Name of the beneficiary's bank branch"
          },
          "bankAddress": {
            "type": "string",
            "description": "Address of the beneficiary's bank"
          },
          "bankCity": {
            "type": "string",
            "description": "City where the beneficiary's bank is located"
          },
          "bankProvince": {
            "type": "string",
            "description": "Province or state where the beneficiary's bank is located"
          },
          "bankPostalCode": {
            "type": "string",
            "description": "Postal code of the beneficiary's bank"
          },
          "bankCountry": {
            "type": "string",
            "description": "Country where the beneficiary's bank is located, in ISO 3166-1 alpha-2 format. Currently only AE (United Arab Emirates) is supported via the API. For international beneficiaries, please use the HubPay corporate portal.",
            "example": "AE",
            "maxLength": 2,
            "minLength": 2
          },
          "accountType": {
            "type": "string",
            "description": "Type of the beneficiary's bank account",
            "enum": [
              "CHECKING",
              "SAVINGS",
              "STANDARD",
              "DEPOSIT",
              "OTHERS"
            ],
            "example": "SAVINGS"
          },
          "branchCode": {
            "type": "string",
            "description": "Branch code of the beneficiary's bank, if applicable"
          }
        },
        "required": [
          "accountNumber",
          "bankCountry",
          "bic",
          "currency"
        ]
      },
      "BeneficiaryPersonalDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Classification of the beneficiary, such as INDIVIDUAL or BUSINESS",
            "enum": [
              "INDIVIDUAL",
              "BUSINESS"
            ]
          },
          "name": {
            "type": "string",
            "description": "Full legal name of the beneficiary"
          },
          "addressLine1": {
            "type": "string",
            "description": "Beneficiary's address line 1"
          },
          "addressLine2": {
            "type": "string",
            "description": "Beneficiary's address line 2, if applicable"
          },
          "city": {
            "type": "string",
            "description": "City where the beneficiary resides"
          },
          "province": {
            "type": "string",
            "description": "Province or state where the beneficiary resides"
          },
          "postalCode": {
            "type": "string",
            "description": "Postal code of the beneficiary's address"
          },
          "country": {
            "type": "string",
            "description": "Country where the beneficiary resides, in ISO 3166-1 alpha-2 format",
            "example": "AE",
            "maxLength": 2,
            "minLength": 2
          },
          "phoneNumber": {
            "type": "string",
            "description": "Beneficiary's phone number, including country code"
          },
          "taxId": {
            "type": "string",
            "description": "Beneficiary's tax identification number, if applicable"
          },
          "idNumber": {
            "type": "string",
            "description": "Beneficiary's identification number, such as a passport or national ID"
          },
          "contactName": {
            "type": "string",
            "description": "Name of the contact person for the beneficiary, if applicable"
          }
        },
        "required": [
          "addressLine1",
          "country",
          "name",
          "type"
        ]
      },
      "BeneficiaryRequest": {
        "type": "object",
        "description": "Request for creating beneficiary",
        "properties": {
          "personalDetails": {
            "$ref": "#/components/schemas/BeneficiaryPersonalDetails",
            "description": "Beneficiary's personal details"
          },
          "bankDetails": {
            "$ref": "#/components/schemas/BeneficiaryBankDetails",
            "description": "Beneficiary's bank details"
          },
          "externalId": {
            "type": "string",
            "description": "Client-provided identifier for the beneficiary, used for idempotency or external reference",
            "minLength": 1
          }
        },
        "required": [
          "bankDetails",
          "externalId",
          "personalDetails"
        ]
      },
      "Beneficiary": {
        "type": "object",
        "description": "Details of a Beneficiary",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "System-generated unique identifier for the beneficiary"
          },
          "externalId": {
            "type": "string",
            "description": "Client-provided identifier for the beneficiary, used for idempotency or external reference",
            "maxLength": 36,
            "minLength": 0
          },
          "accountId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the account associated with this beneficiary"
          },
          "beneficiaryStatus": {
            "type": "string",
            "description": "The status of the beneficiary, e.g. VERIFIED",
            "enum": [
              "CREATED",
              "FAILED",
              "VERIFIED"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Date and time when the beneficiary was created"
          },
          "personalDetails": {
            "$ref": "#/components/schemas/BeneficiaryPersonalDetails",
            "description": "Beneficiary's personal details"
          },
          "bankDetails": {
            "$ref": "#/components/schemas/BeneficiaryBankDetails",
            "description": "Beneficiary's bank details"
          }
        },
        "required": [
          "accountId",
          "bankDetails",
          "beneficiaryStatus",
          "createdAt",
          "externalId",
          "id",
          "personalDetails"
        ]
      },
      "UpdateUserRequest": {
        "type": "object",
        "description": "Request to update a user",
        "properties": {
          "displayName": {
            "type": "string",
            "description": "Display name of the user",
            "maxLength": 255,
            "minLength": 0
          },
          "userBlockedStatus": {
            "type": "string",
            "description": "Blocked status of the user",
            "enum": [
              "BLOCKED",
              "NOT_BLOCKED"
            ]
          }
        },
        "required": [
          "displayName"
        ]
      },
      "User": {
        "type": "object",
        "description": "A user linked to the account",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the user"
          },
          "idpId": {
            "type": "string",
            "format": "uuid",
            "description": "Identity provider ID"
          },
          "emailAddress": {
            "type": "string",
            "description": "Email address of the user"
          },
          "phoneNumber": {
            "type": "string",
            "description": "Phone number of the user"
          },
          "displayName": {
            "type": "string",
            "description": "Display name of the user"
          },
          "blockedStatus": {
            "type": "string",
            "description": "Blocked status of the user",
            "enum": [
              "BLOCKED",
              "NOT_BLOCKED"
            ]
          },
          "role": {
            "type": "string",
            "description": "User role within the account.\n\n- **OWNER**: Full account access. Can manage users, accept terms and conditions, and approve own transactions.\n- **ADMIN**: Full operational access. Can approve own transactions but cannot manage users.\n- **EXECUTOR**: Can create and approve payments and transfers. Cannot approve own transactions (segregation of duties).\n- **PREPARER**: Can draft payments and manage beneficiaries. Cannot execute or approve transactions.\n- **VIEWER**: Read-only access.\n",
            "enum": [
              "OWNER",
              "ADMIN",
              "EXECUTOR",
              "PREPARER",
              "VIEWER"
            ]
          },
          "accountId": {
            "type": "string",
            "format": "uuid",
            "description": "Account ID the user is linked to"
          }
        }
      },
      "UpdateUserRoleRequest": {
        "type": "object",
        "description": "Request to update user role",
        "properties": {
          "role": {
            "type": "string",
            "description": "User role within the account.\n\n- **OWNER**: Full account access. Can manage users, accept terms and conditions, and approve own transactions.\n- **ADMIN**: Full operational access. Can approve own transactions but cannot manage users.\n- **EXECUTOR**: Can create and approve payments and transfers. Cannot approve own transactions (segregation of duties).\n- **PREPARER**: Can draft payments and manage beneficiaries. Cannot execute or approve transactions.\n- **VIEWER**: Read-only access.\n",
            "enum": [
              "OWNER",
              "ADMIN",
              "EXECUTOR",
              "PREPARER",
              "VIEWER"
            ]
          }
        },
        "required": [
          "role"
        ]
      },
      "ConfirmSubmissionRequest": {
        "type": "object",
        "properties": {
          "accountTier": {
            "type": "string",
            "description": "See [Hubpay tier plans](https://wearehubpay.com/pricing)",
            "enum": [
              "STARTER",
              "SCALE",
              "TREASURY"
            ]
          }
        },
        "required": [
          "accountTier"
        ]
      },
      "Account": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique ID",
            "readOnly": true
          },
          "accountType": {
            "type": "string",
            "description": "Account type.",
            "enum": [
              "INDIVIDUAL",
              "BUSINESS"
            ]
          },
          "accountName": {
            "type": "string",
            "description": "Name of account."
          },
          "email": {
            "type": "string",
            "description": "Email address."
          },
          "phoneNumber": {
            "type": "string",
            "description": "Phone number of customer (preferably mobile)."
          },
          "countryCode": {
            "type": "string",
            "description": "Country of residence for INDIVIDUAL. Country of registration for BUSINESS.",
            "example": "GB"
          },
          "externalId": {
            "type": "string",
            "description": "Client-provided identifier for the account. Used for idempotency and external reference."
          },
          "accountStatus": {
            "type": "string",
            "description": "Represents the current onboarding and operational status of the account.\n\nPossible values:\n- **CREATED**: Account created.\n- **APPLICATION_IN_PROGRESS**: Account sign-up accepted, onboarding in progress.\n- **APPLICATION_SUBMITTED**: Customer has submitted the application and pending review by operations.\n- **APPLICATION_APPROVED**: Application approved by operations, awaiting card details to activate account.\n- **ACTIVE**: Card details added and account is now fully onboarded.\n- **DECLINED**: Application was rejected by operations or did not meet eligibility criteria.\n- **SUSPENDED**: Account temporarily disabled due to billing issues or subscription expiry.\n- **CLOSED**: Account has been permanently closed or terminated.\n",
            "enum": [
              "CREATED",
              "APPLICATION_IN_PROGRESS",
              "APPLICATION_SUBMITTED",
              "APPLICATION_APPROVED",
              "ACTIVE",
              "DECLINED",
              "SUSPENDED",
              "CLOSED"
            ]
          },
          "accountTier": {
            "type": "string",
            "description": "See [Hubpay tier plans](https://wearehubpay.com/pricing)",
            "enum": [
              "STARTER",
              "SCALE",
              "TREASURY"
            ]
          }
        },
        "required": [
          "accountType",
          "id"
        ]
      },
      "PersonAttachedDocuments": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Specifies the type of the document being attached",
            "enum": [
              "PASSPORT",
              "EMIRATES_ID",
              "BANK_STATEMENT",
              "CV",
              "VALID_GOVERNMENT_ID",
              "RESIDING_COUNTRY_PROOF_OF_ADDRESS"
            ]
          },
          "documentIds": {
            "type": "array",
            "description": "List of document IDs uploaded for the selected type",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 1,
            "uniqueItems": true
          }
        },
        "required": [
          "documentIds",
          "type"
        ]
      },
      "RelatedPersonRequest": {
        "type": "object",
        "properties": {
          "fullNameAsPerId": {
            "type": "string",
            "description": "Full name of the individual exactly as it appears on their official identification document (e.g., passport or national ID)",
            "maxLength": 255,
            "minLength": 0
          },
          "attachedDocuments": {
            "type": "array",
            "description": "A list of documents attached for the individual. These documents should be uploaded first. See [Upload Documents API](https://docs.hubpay.io/docs/financial-gateway-api/upload-document) for more details.\n\n- **PASSPORT**: Mandatory for all individuals. Used for identity verification.\n- **EMIRATES_ID**: Required for UAE residents as a government-issued ID.\n- **BANK_STATEMENT**: Required for shareholders **only if the business does not have a bank account**. Must include the last 6 months of statements to verify financial standing and source of funds.\n- **CV**: Required for Directors **only if the business does not have a bank account and a LinkedIn profile URL is not provided**. Helps assess the individual’s professional background and experience.\n- **VALID_GOVERNMENT_ID**: Required for Directors or UBOs **only if the individual is NOT residing in the UAE** (i.e. national ID, driver's license, etc).\n- **RESIDING_COUNTRY_PROOF_OF_ADDRESS**: Required for Directors or UBOs **only if the individual is NOT residing in the UAE** (i.e. utility bill issued within 90 days or valid tenancy contract).\n",
            "items": {
              "$ref": "#/components/schemas/PersonAttachedDocuments"
            },
            "minItems": 1
          },
          "authorizedSignatory": {
            "type": "boolean",
            "description": "Indicates whether the individual has the authority to sign documents and make official commitments on behalf of the company"
          },
          "director": {
            "type": "boolean",
            "description": "Indicates whether the individual is legally responsible for managing the company's operations and decision-making"
          },
          "shareholder": {
            "type": "boolean",
            "description": "Indicates whether the individual is a shareholder of the company"
          },
          "uaeResident": {
            "type": "boolean",
            "description": "Indicates whether the individual resides in the UAE"
          },
          "linkedInProfileUrl": {
            "type": "string",
            "description": "URL to the individual's LinkedIn profile. Can be provided as an alternative to the CV document for directors when the business does not have a bank account.",
            "maxLength": 120,
            "minLength": 0,
            "pattern": "^$|^(https?://)?(www\\.)?linkedin\\.com/in/[a-zA-Z0-9-]+(/.*)?(\\?.*)?$"
          }
        },
        "required": [
          "attachedDocuments",
          "authorizedSignatory",
          "director",
          "fullNameAsPerId",
          "shareholder",
          "uaeResident"
        ]
      },
      "DocumentUpload": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "fileName": {
            "type": "string"
          },
          "contentType": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "contentType",
          "createdAt",
          "fileName",
          "id"
        ]
      },
      "PersonDocument": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "NOT_SUBMITTED",
              "PENDING_REVIEW",
              "DECLINED",
              "APPROVED",
              "PENDING_VERIFICATION",
              "VALIDATION_WARNINGS"
            ]
          },
          "required": {
            "type": "boolean"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "declinedReason": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "NOT_CERTIFIED",
              "INVALID_DOCUMENT_TYPE",
              "QUALITY",
              "OTHER_SEE_SUPPORT"
            ]
          },
          "declinedCustomerDisplayReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "validationStatus": {
            "type": [
              "string",
              "null"
            ],
            "description": "When status is VALIDATION_WARNINGS, the specific warning category from automated document review.",
            "enum": [
              "WARNING_NOT_CERTIFIED",
              "WARNING_SUSPECTED_INVALID_DOCUMENT_TYPE",
              "WARNING_QUALITY_INSUFFICIENT",
              "WARNING_EXPIRED_DOCUMENT",
              "WARNING_EXPIRING_DOCUMENT",
              "WARNING_OTHER",
              "WARNING_REQUIRED_FIELDS_MISSING",
              "CRITICAL_CERTAIN_INVALID_DOCUMENT_TYPE",
              "CRITICAL_DOCUMENT_UNREADABLE",
              "CRITICAL_OTHER"
            ]
          },
          "validationMessage": {
            "type": [
              "string",
              "null"
            ],
            "description": "When status is VALIDATION_WARNINGS, a human-readable warning message safe to show the end customer."
          },
          "lastUpdatedBy": {
            "type": [
              "string",
              "null"
            ]
          },
          "lastUpdatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "documentUploads": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentUpload"
            }
          },
          "documentType": {
            "type": "string",
            "description": "A list of documents attached for the individual. These documents should be uploaded first. See [Upload Documents API](https://docs.hubpay.io/docs/financial-gateway-api/upload-document) for more details.\n\n- **PASSPORT**: Mandatory for all individuals. Used for identity verification.\n- **EMIRATES_ID**: Required for UAE residents as a government-issued ID.\n- **BANK_STATEMENT**: Required for shareholders **only if the business does not have a bank account**. Must include the last 6 months of statements to verify financial standing and source of funds.\n- **CV**: Required for Directors or UBOs **only if the business do not have a bank account**. Helps assess the individual’s professional background and experience.\n- **VALID_GOVERNMENT_ID**: Required for Directors or UBOs **only if the individual is NOT residing in the UAE** (i.e. national ID, driver's license, etc).\n- **RESIDING_COUNTRY_PROOF_OF_ADDRESS**: Required for Directors or UBOs **only if the individual is NOT residing in the UAE** (i.e. utility bill issued within 90 days or valid tenancy contract).\n",
            "enum": [
              "PASSPORT",
              "EMIRATES_ID",
              "BANK_STATEMENT",
              "CV",
              "VALID_GOVERNMENT_ID",
              "RESIDING_COUNTRY_PROOF_OF_ADDRESS"
            ]
          }
        },
        "required": [
          "description",
          "documentType",
          "documentUploads",
          "id",
          "required",
          "status",
          "title"
        ]
      },
      "RelatedPerson": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the related person"
          },
          "status": {
            "type": "string",
            "description": "Status of the related person in the onboarding or review process.\n\n- **NOT_SUBMITTED**: The individual’s details have not yet been submitted for review.\n- **UNDER_REVIEW**: The individual's information and documents are currently under review.\n- **ACTION_REQUIRED**: The individual’s submission requires additional actions, such as uploading missing or invalid documents.\n- **APPROVED**: The individual’s information has been reviewed and approved.\n",
            "enum": [
              "NOT_SUBMITTED",
              "UNDER_REVIEW",
              "ACTION_REQUIRED",
              "APPROVED"
            ]
          },
          "fullNameAsPerId": {
            "type": "string",
            "description": "Full name of the individual exactly as it appears on their official identification document (e.g., passport or national ID)"
          },
          "documents": {
            "type": "array",
            "description": "A list of documents associated with the individual",
            "items": {
              "$ref": "#/components/schemas/PersonDocument"
            }
          },
          "authorizedSignatory": {
            "type": "boolean",
            "description": "Indicates whether the individual has the authority to sign documents and make official commitments on behalf of the company"
          },
          "director": {
            "type": "boolean",
            "description": "Indicates whether the individual is legally responsible for managing the company's operations and decision-making"
          },
          "shareholder": {
            "type": "boolean",
            "description": "Indicates whether the individual is a shareholder of the company"
          },
          "uaeResident": {
            "type": "boolean",
            "description": "Indicates whether the individual resides in the UAE"
          },
          "linkedInProfileUrl": {
            "type": "string",
            "description": "URL to the individual's LinkedIn profile, used for background and professional verification"
          }
        },
        "required": [
          "authorizedSignatory",
          "director",
          "documents",
          "fullNameAsPerId",
          "id",
          "shareholder",
          "status",
          "uaeResident"
        ]
      },
      "CorporateAttachedDocuments": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Specifies the type of the document being attached",
            "enum": [
              "TRADE_LICENSE",
              "MEMORANDUM_OF_ASSOCIATION_OR_ARTICLES_OF_ASSOCIATION",
              "SHAREHOLDING_CERTIFICATE"
            ]
          },
          "documentIds": {
            "type": "array",
            "description": "List of document IDs uploaded for the selected type",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 1,
            "uniqueItems": true
          }
        },
        "required": [
          "documentIds",
          "type"
        ]
      },
      "RelatedCorporateRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Registered legal name of the corporate entity",
            "maxLength": 255,
            "minLength": 0,
            "pattern": "^[a-zA-Z0-9\\s\\-\\.&]+$"
          },
          "relationship": {
            "type": "string",
            "description": "The relationship of the corporate entity to the business being onboarded.\n\n- **PARENT**: A company that owns or controls the business being onboarded\n- **SUBSIDIARY**: A company that is owned or controlled by the business being onboarded\n",
            "enum": [
              "PARENT",
              "SUBSIDIARY"
            ]
          },
          "sharePercentageOwned": {
            "type": "number",
            "format": "double",
            "description": "Percentage of shares owned (1-100)",
            "maximum": 100,
            "minimum": 1
          },
          "attachedDocuments": {
            "type": "array",
            "description": "A list of documents attached for the corporate entity. These documents should be uploaded first. See [Upload Documents API](https://docs.hubpay.io/docs/financial-gateway-api/upload-document) for more details.\n\nDocument requirements depend on the relationship type:\n\n**PARENT relationship:**\n\n- **TRADE_LICENSE**: Required. The corporate entity's trade licence.\n- **MEMORANDUM_OF_ASSOCIATION_OR_ARTICLES_OF_ASSOCIATION**: Required. Becomes optional if a Shareholding Certificate is provided.\n- **SHAREHOLDING_CERTIFICATE**: Optional.\n\n**SUBSIDIARY relationship:** No document requirements.\n",
            "items": {
              "$ref": "#/components/schemas/CorporateAttachedDocuments"
            }
          }
        },
        "required": [
          "name",
          "relationship",
          "sharePercentageOwned"
        ]
      },
      "CorporateDocument": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "NOT_SUBMITTED",
              "PENDING_REVIEW",
              "DECLINED",
              "APPROVED",
              "PENDING_VERIFICATION",
              "VALIDATION_WARNINGS"
            ]
          },
          "required": {
            "type": "boolean"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "declinedReason": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "NOT_CERTIFIED",
              "INVALID_DOCUMENT_TYPE",
              "QUALITY",
              "OTHER_SEE_SUPPORT"
            ]
          },
          "declinedCustomerDisplayReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "validationStatus": {
            "type": [
              "string",
              "null"
            ],
            "description": "When status is VALIDATION_WARNINGS, the specific warning category from automated document review.",
            "enum": [
              "WARNING_NOT_CERTIFIED",
              "WARNING_SUSPECTED_INVALID_DOCUMENT_TYPE",
              "WARNING_QUALITY_INSUFFICIENT",
              "WARNING_EXPIRED_DOCUMENT",
              "WARNING_EXPIRING_DOCUMENT",
              "WARNING_OTHER",
              "WARNING_REQUIRED_FIELDS_MISSING",
              "CRITICAL_CERTAIN_INVALID_DOCUMENT_TYPE",
              "CRITICAL_DOCUMENT_UNREADABLE",
              "CRITICAL_OTHER"
            ]
          },
          "validationMessage": {
            "type": [
              "string",
              "null"
            ],
            "description": "When status is VALIDATION_WARNINGS, a human-readable warning message safe to show the end customer."
          },
          "lastUpdatedBy": {
            "type": [
              "string",
              "null"
            ]
          },
          "lastUpdatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "documentUploads": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentUpload"
            }
          },
          "documentType": {
            "type": "string",
            "description": "The type of corporate document.\n\n- **TRADE_LICENSE**: The corporate entity's trade licence. Required for PARENT relationships.\n- **MEMORANDUM_OF_ASSOCIATION_OR_ARTICLES_OF_ASSOCIATION**: Required for PARENT relationships. Becomes optional if a Shareholding Certificate is attached.\n- **SHAREHOLDING_CERTIFICATE**: Optional for PARENT relationships.\n",
            "enum": [
              "TRADE_LICENSE",
              "MEMORANDUM_OF_ASSOCIATION_OR_ARTICLES_OF_ASSOCIATION",
              "SHAREHOLDING_CERTIFICATE"
            ]
          }
        },
        "required": [
          "description",
          "documentType",
          "documentUploads",
          "id",
          "required",
          "status",
          "title"
        ]
      },
      "RelatedCorporate": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the related corporate entity"
          },
          "name": {
            "type": "string",
            "description": "Registered legal name of the corporate entity"
          },
          "relationship": {
            "type": "string",
            "description": "The relationship of the corporate entity to the business being onboarded",
            "enum": [
              "PARENT",
              "SUBSIDIARY"
            ]
          },
          "percentageOwned": {
            "type": "number",
            "format": "double",
            "description": "Percentage of shares owned"
          },
          "documents": {
            "type": "array",
            "description": "A list of documents associated with the corporate entity",
            "items": {
              "$ref": "#/components/schemas/CorporateDocument"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the corporate entity was added"
          }
        },
        "required": [
          "createdAt",
          "documents",
          "id",
          "name",
          "percentageOwned",
          "relationship"
        ]
      },
      "BusinessProfileRequest": {
        "type": "object",
        "properties": {
          "accountName": {
            "type": "string",
            "description": "The legal entity name of the business.",
            "maxLength": 100,
            "minLength": 0,
            "pattern": "^[a-zA-Z0-9\\s\\-\\.&]+$"
          },
          "countryOfRegistration": {
            "type": "string",
            "description": "Country of registration of the business.",
            "example": "AE",
            "minLength": 1
          },
          "industries": {
            "type": "array",
            "description": "Industry or industries in which the business operates.",
            "items": {
              "type": "string",
              "enum": [
                "GENERAL_TRADING",
                "MEDICAL_SUPPLIES",
                "AUTO_SPARE_PARTS",
                "RECRUITMENT",
                "TEXTILES",
                "MACHINERY_PARTS",
                "ADVISORY_FIRM",
                "CONSULTANCY",
                "HEALTHCARE_AND_DENTISTRY",
                "FOODSTUFF",
                "HOTEL_SUPPLIES",
                "SHIPPING_AND_TRANSPORT",
                "MEAT",
                "PERFUMES_TRADING",
                "WHOLESALERS",
                "PET_SUPPLIES_AND_FOODS",
                "AGRICULTURE_SUPPLIES",
                "FLOWER_SHOPS",
                "RAW_MATERIALS",
                "INFORMATION_TECHNOLOGY",
                "CHOCOLATE_AND_SWEETS",
                "MARINE_SUPPLIES",
                "EDUCATION",
                "ELECTRICAL_TRADING",
                "ACCOUNTING_TAXATION_PAYROLL_SERVICES",
                "ADULT_ENTERTAINMENT_AND_OR_PORNOGRAPHY",
                "ADVERTISING_MARKETING_AND_PR",
                "ADVOCACY_ORGANIZATIONS",
                "AEROSPACE_AND_DEFENSE",
                "AGRICULTURE",
                "AIRCRAFT_MANUFACTURER_AND_SPARE_PARTS",
                "AIRLINES",
                "AIR_CARGO",
                "AIRPORT_HARBOR_AND_TERMINAL_OPERATIONS",
                "ALCOHOLIC_BEVERAGES",
                "ALTERNATIVE_ENERGY_SOURCES",
                "AMUSEMENT_PARKS_AND_ATTRACTIONS",
                "ANIMAL_TRADING",
                "APPAREL_AND_ACCESSORIES_RETAILERS_AND_WHOLESALERS",
                "ARCHITECTURE_ENGINEERING_AND_DESIGN",
                "ARMS_MANUFACTURERS_AND_DEALERS",
                "AUCTION_SERVICES",
                "AUDIO_VIDEO_AND_PHOTOGRAPHY",
                "AUTOMOBILE_DEALERS_NEW_VEHICLES",
                "AUTOMOBILE_PARTS_WHOLESALERS",
                "AUTOMOTIVE_REPAIR_AND_MAINTENANCE",
                "BANKING_AND_FINANCIAL_SERVICES",
                "BEAUTY_SUPPLIES_AND_COSMETICS",
                "BIOTECHNOLOGY",
                "BLOOD_ORGANS_BODY_PARTS",
                "BOAT_AND_YACHT_DEALERS",
                "BUILDING_MATERIALS_CONCRETE_AND_GLASS",
                "CABLE_AND_TELEVISION_PROVIDERS",
                "CALL_CENTERS",
                "CAR_WASH_SERVICES",
                "CASINOS_GAMBLING_WAGERING_INSTITUTIONS_AND_ONLINE_GAMBLING",
                "CHEMICALS_PETROCHEMICALS_AND_PETROLEUM_PRODUCTS",
                "CLOTHING_AND_SHOE_STORES",
                "COLLEGES_AND_UNIVERSITIES",
                "COMPUTER_AND_ELECTRONICS",
                "COMMERCIAL_BROKERS",
                "COMPANY_SERVICE_PROVIDERS",
                "CONSTRUCTION_AND_REMODELING",
                "CONSTRUCTION_EQUIPMENT_AND_SUPPLIES",
                "CONSULTING_SERVICES",
                "COUNTERFEIT_PIRATED_GOODS",
                "CROWDFUNDING",
                "CRUISE_SHIP_OPERATIONS",
                "CRYPTO_CURRENCY_VIRTUAL_ASSETS_NFT",
                "CYBER_LOCKERS",
                "DATA_ANALYTICS_AND_MANAGEMENT",
                "DATA_AND_RECORDS_MANAGEMENT",
                "DATING_AGENCIES",
                "DEBT_COLLECTION_SERVICES",
                "DEPARTMENTAL_AND_GROCERY_STORES",
                "DIAGNOSTIC_LABORATORIES",
                "DIAMOND_GOLD_JEWELRY_PRECIOUS_METAL_AND_STONES_DEALERS",
                "DOCTORS_AND_HEALTH_CARE_PRACTITIONERS",
                "DRY_CLEANERS_AND_LAUNDRIES",
                "E_COMMERCE_AND_INTERNET_BUSINESS",
                "EDUCATION_SERVICES",
                "EMBASSIES_DIPLOMATIC_MISSIONS_AND_CONSULATE",
                "EXCHANGE_HOUSE",
                "FACILITIES_MANAGEMENT_AND_MAINTENANCE",
                "FISHING_HUNTING_AND_FORESTRY_AND_LOGGING",
                "FOLLOWER_AND_LIKE_FARMS",
                "FOOD_AND_BEVERAGE_SUPPLIERS",
                "FOOD_AND_DAIRY_PRODUCT_MANUFACTURING_AND_PACKAGING",
                "FLAVORS_AND_FRAGRANCES",
                "FREIGHT_HAULING_RAIL_AND_TRUCK",
                "FUNERAL_HOMES_AND_SERVICES",
                "FURNITURE_STORES_AND_MANUFACTURING",
                "GAMING",
                "GIFT_CARDS",
                "GENERAL_TRADING_OR_GOODS_WHOLESALERS",
                "GOVERNMENT_ORGANIZATIONS",
                "HACKING_MATERIALS",
                "HAIRDRESSERS_BARBER_SHOPS_AND_SALONS",
                "HARDWARE_AND_BUILDING_MATERIAL_DEALERS",
                "HEALTHCARE_AND_HOSPITALS",
                "HEAVY_EQUIPMENT_AND_MACHINERY_SPARE_PARTS_TRADING",
                "HOTELS",
                "HR_AND_RECRUITING_SERVICES",
                "INTERNATIONAL_BODIES_AND_ORGANIZATIONS",
                "INTERNET_PUBLISHING",
                "INVESTMENT",
                "IT_AND_NETWORK_SERVICES_AND_SUPPORT",
                "LAUNDRY_AND_DRY_CLEANING",
                "LAW_FIRMS_AND_LEGAL_SERVICES",
                "LENDING_AND_MORTGAGES",
                "LEASING_AIRCRAFTS",
                "LIBRARIES_ARCHIVES_AND_MUSEUMS",
                "LITIGATION_FINANCE_COMPANIES",
                "MACHINERY_AND_EQUIPMENT",
                "MARIJUANA_CANNABIS_INDUSTRY_AND_OTHER_RECREATIONAL_DRUG_INDUSTRIES",
                "MARINE_AND_INLAND_SHIPPING_AND_CARGO",
                "MARINE_EQUIPMENT_TRADING",
                "MASSAGE_PARLOURS",
                "MEAT_TRADERS",
                "MEDIA_AND_ENTERTAINMENT",
                "MEDICAL_DEVICES_AND_EQUIPMENT_MANUFACTURERS_AND_SUPPLIERS",
                "METAL_AND_MINERAL_WHOLESALERS",
                "MINING_AND_QUARRYING",
                "MONEY_BROKERS",
                "MONEY_SERVICES_BUSINESS_PAYMENT_SERVICES_PROVIDERS",
                "MOTION_PICTURE_AND_RECORDING_PRODUCERS",
                "MOVING_COMPANIES_AND_SERVICES",
                "MULTI_LEVEL_MARKETING_OR_PYRAMID_SCHEMES",
                "NAIL_SALONS",
                "NETWORK_EQUIPMENT_AND_SECURITY_PRODUCTS",
                "NEWSPAPER_BOOKS_AND_PERIODICALS_PUBLISHERS",
                "NIGHT_CLUBS",
                "NON_GOVERNMENT_ORGANIZATIONS_CHARITIES_OR_TRUSTS",
                "OFFICE_EQUIPMENT_AND_SUPPLIERS_AND_WHOLESALERS",
                "OIL_AND_GAS",
                "OIL_AND_GAS_MACHINERY_AND_EQUIPMENT",
                "PAPER_AND_PAPER_PRODUCTS",
                "PARKING_LOTS_AND_GARAGE_MANAGEMENT",
                "PAWN_BROKERS_AND_SHOPS",
                "PAYDAY_LOAN_COMPANIES",
                "PENSION_FUNDS",
                "PHARMACEUTICALS",
                "PLASTIC_WHOLESALER",
                "PLASTICS_AND_RUBBER_MANUFACTURING",
                "POSTAL_EXPRESS_DELIVERY_AND_COURIERS",
                "PRECISION_INSTRUMENTS_AND_CONTROLS",
                "PRIVATE_SECURITY_FIRMS_AND_PRIVATE_MILITARY_CONTRACTORS",
                "PROLIFERATION_OF_WEAPONS_OF_MASS_DESTRUCTION",
                "PROPERTY_LEASING_AND_MANAGEMENT",
                "PROSTITUTION_MODEL_AGENCIES_ESCORT",
                "PROVIDERS_OF_PRIVATE_ONLINE_LOTTERY_MAIL_ORDER_LOTTERIES_AND_SWEEPSTAKES",
                "RADIO_AND_TELEVISION_BROADCASTING",
                "REAL_ESTATE_AGENTS_AND_APPRAISERS",
                "REAL_ESTATE_CONSTRUCTION_AND_DEVELOPERS",
                "RELIGIOUS_ORGANIZATIONS_AND_PLACES_OF_WORSHIP",
                "RENTAL_CARS",
                "RESIDENTIAL_AND_LONG_TERM_CARE_FACILITIES",
                "RESTAURANTS_AND_BARS",
                "SAUNA_HAMMAM_OR_BATH_HOUSES",
                "SCRAP_METAL",
                "SCUBA_DIVING_EQUIPMENT",
                "SECURITIES_AND_COMMODITY_EXCHANGES",
                "SECURITIES_AGENTS_AND_BROKERS",
                "SEMICONDUCTOR_AND_MICROCHIP_MANUFACTURING",
                "SEWAGE_TREATMENT_FACILITIES",
                "SHELL_BANKS",
                "SMOKING_CLUBS",
                "SOCIAL_AND_MEMBERSHIP_ORGANIZATIONS",
                "SOCIAL_MEDIA",
                "SOFTWARE_SERVICES",
                "SPORTS_GAMBLING",
                "SPORTS_ARTS_AND_RECREATION",
                "TATTOO_SHOPS",
                "TAXI_BUSES_AND_TRANSIT_SYSTEMS",
                "TECHNICAL_AND_TRADE_SCHOOLS",
                "TELECOMMUNICATIONS_EQUIPMENT_AND_ACCESSORIES",
                "TELEPHONE_SERVICE_PROVIDERS_AND_CARRIERS",
                "TEXTILES_APPAREL_AND_ACCESSORIES",
                "TOBACCO_VAPE_E_CIGARETTES_CONTROLLED_PRODUCTS",
                "TOOLS_AND_HARDWARE",
                "TRADE_GROUPS_AND_LABOR_UNIONS",
                "TRADING_FOR_RETAIL_CUSTOMERS",
                "TRAVEL_AGENTS_AND_SERVICES",
                "TRAVEL_TOURISM_RECREATIONS_AND_LEISURE",
                "TRUST_FIDUCIARY_AND_CUSTODIAN_ACTIVITIES",
                "UNAUTHORISED_TICKET_SELLERS",
                "UNLAWFUL_INTERNET_GAMBLING",
                "USED_AUTOMOBILE_DEALERS_AND_SELLERS_OF_USED_CAR_PARTS",
                "VETERINARY_CLINICS_AND_SERVICES",
                "VIDEO_AND_LIVE_STREAMING",
                "VIDEO_AND_TELECONFERENCING",
                "WAREHOUSING_AND_STORAGE",
                "WASTE_MANAGEMENT_AND_RECYCLING",
                "WATER_TREATMENT_AND_UTILITIES",
                "OTHER"
              ]
            },
            "minItems": 1,
            "uniqueItems": true
          },
          "legalType": {
            "type": "string",
            "description": "Legal business type.",
            "enum": [
              "LIMITED_LIABILITY_COMPANY",
              "SOLE_PROPRIETORSHIP",
              "GENERAL_PARTNERSHIP_COMPANY"
            ]
          },
          "incorporatedInUae": {
            "type": "boolean",
            "description": "Indicates if the business is incorporated in the UAE."
          },
          "hasBankAccount": {
            "type": "boolean",
            "description": "Indicates if the business has a bank account."
          },
          "yearsOfBusinessRange": {
            "type": "string",
            "description": "The number of years the business has been in operation.",
            "enum": [
              "LESS_THAN_ONE",
              "ONE_TO_TWO",
              "TWO_TO_FIVE",
              "FIVE_PLUS"
            ]
          },
          "numberOfEmployeesRange": {
            "type": "string",
            "description": "The number of employees the business currently has.",
            "enum": [
              "ONE_TO_TEN",
              "TEN_TO_THIRTY",
              "THIRTY_PLUS"
            ]
          },
          "annualRevenue": {
            "type": "integer",
            "format": "int32",
            "description": "The annual revenue (in USD) of the business. A positive integer is required."
          },
          "website": {
            "type": "string",
            "description": "The full website URL of the business.",
            "maxLength": 500,
            "minLength": 0
          },
          "productOrServiceSold": {
            "type": "string",
            "description": "**Required** if website is not provided.\n\nDescription of the product or service the business sells.\n",
            "maxLength": 500,
            "minLength": 0
          },
          "intendedSalesChannel": {
            "type": "string",
            "description": "**Required** if website is not provided.\n\nThe intended sales channel for the business.\n",
            "enum": [
              "ONLINE",
              "IN_PERSON",
              "BOTH"
            ]
          },
          "salesDistributionChannels": {
            "type": "array",
            "description": "**Required** if website is not provided.\n\nThe primary sales and distribution channels used by the business.\n",
            "items": {
              "type": "string",
              "enum": [
                "SOCIAL_MEDIA",
                "REFERRALS",
                "TRADE_SHOWS",
                "DIGITAL_ADVERTISING",
                "IN_PERSON_SALES_TEAM",
                "OTHER"
              ]
            },
            "uniqueItems": true
          },
          "investmentSourceOfFunds": {
            "$ref": "#/components/schemas/InvestmentSourceOfFunds",
            "description": "**Required** if business does not have a bank account in UAE.\n\nDetails of source of funds for the business.\n"
          },
          "incomingPaymentCountries": {
            "type": "array",
            "description": "The countries from which payments will be made into your account. These must be valid ISO 3166-1 alpha-2 country codes.",
            "items": {
              "type": "string"
            },
            "minItems": 1
          },
          "incomingPaymentsMonthlyVolume": {
            "type": "integer",
            "format": "int32",
            "description": "The estimated volume (in USD) of incoming payments per month."
          },
          "incomingPaymentsMonthlyCount": {
            "type": "integer",
            "format": "int32",
            "description": "The estimated number of incoming payments per month."
          },
          "outgoingPaymentCountries": {
            "type": "array",
            "description": "The countries to which payments will be made from your account. These must be valid ISO 3166-1 alpha-2 country codes.",
            "items": {
              "type": "string"
            },
            "minItems": 1
          },
          "outgoingPaymentsMonthlyVolume": {
            "type": "integer",
            "format": "int32",
            "description": "The estimated volume (in USD) of outgoing payments per month."
          },
          "outgoingPaymentsMonthlyCount": {
            "type": "integer",
            "format": "int32",
            "description": "The estimated number of outgoing payments per month."
          },
          "accountOpeningPurposes": {
            "type": "array",
            "description": "The purpose(s) for opening the account. At least one option must be selected.",
            "items": {
              "type": "string",
              "enum": [
                "RECEIVE_FUNDS",
                "SEND_FUNDS",
                "UAE_PAYMENTS",
                "PLATFORM_INTEGRATION",
                "BULK_PAYMENTS",
                "CRYPTOCURRENCY_PAYMENTS",
                "OTHER"
              ]
            },
            "minItems": 1,
            "uniqueItems": true
          },
          "addressLine1": {
            "type": "string",
            "description": "First line of address.",
            "maxLength": 100,
            "minLength": 0
          },
          "addressLine2": {
            "type": "string",
            "description": "Second line of address.",
            "maxLength": 100,
            "minLength": 0
          },
          "areaOrCity": {
            "type": "string",
            "description": "Address town or city.",
            "maxLength": 50,
            "minLength": 0
          },
          "provinceState": {
            "type": "string",
            "description": "Address province or state.",
            "maxLength": 50,
            "minLength": 0
          },
          "postalCode": {
            "type": "string",
            "description": "Address postal code. Use 0000 if not applicable.",
            "maxLength": 15,
            "minLength": 0
          },
          "dateOfIncorporation": {
            "type": "string",
            "format": "date",
            "description": "The date of incorporation of the business.",
            "example": "2023-12-31"
          }
        },
        "required": [
          "accountName",
          "accountOpeningPurposes",
          "countryOfRegistration",
          "hasBankAccount",
          "incomingPaymentCountries",
          "incomingPaymentsMonthlyCount",
          "incomingPaymentsMonthlyVolume",
          "incorporatedInUae",
          "industries",
          "legalType",
          "numberOfEmployeesRange",
          "outgoingPaymentCountries",
          "outgoingPaymentsMonthlyCount",
          "outgoingPaymentsMonthlyVolume",
          "yearsOfBusinessRange"
        ]
      },
      "InvestmentSourceOfFunds": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "The primary source of funds for the business.",
            "enum": [
              "PERSONAL",
              "INVESTOR",
              "BUSINESS_REVENUE",
              "SALE_OF_ASSET",
              "OTHER"
            ]
          },
          "description": {
            "type": "string",
            "description": "Further explanatory details of source of funds.",
            "minLength": 1
          }
        },
        "required": [
          "description",
          "type"
        ]
      },
      "UpdateBrandingRequest": {
        "type": "object",
        "properties": {
          "primaryColor": {
            "type": "string",
            "description": "Colour of the primary call to action, such as the pay button",
            "example": "#123456",
            "pattern": "^#(?:[0-9a-fA-F]{3}){1,2}$"
          },
          "accentColor": {
            "type": "string",
            "description": "Colour of small marks such as chips and focus rings. Falls back to the primary colour when absent",
            "example": "#abcdef",
            "pattern": "^#(?:[0-9a-fA-F]{3}){1,2}$"
          },
          "backgroundColor": {
            "type": "string",
            "description": "Colour of the surface the checkout sits on. The embedded checkout stays transparent when absent",
            "example": "#f3f0ea",
            "pattern": "^#(?:[0-9a-fA-F]{3}){1,2}$"
          },
          "logo": {
            "type": "string",
            "format": "binary",
            "description": "Logo file to be displayed during payment. Must be JPG or PNG format, at least 128x128 pixels, and no larger than 512KB."
          }
        }
      },
      "AccountBranding": {
        "type": "object",
        "properties": {
          "primaryColor": {
            "type": "string",
            "description": "Colour of the primary call to action, such as the pay button",
            "example": "#123456"
          },
          "accentColor": {
            "type": "string",
            "description": "Colour of small marks such as chips and focus rings. Falls back to the primary colour when absent",
            "example": "#abcdef"
          },
          "backgroundColor": {
            "type": "string",
            "description": "Colour of the surface the checkout sits on. The embedded checkout stays transparent when absent",
            "example": "#f3f0ea"
          },
          "logoUrl": {
            "type": "string",
            "description": "Logo url to the file to be displayed during payment"
          }
        }
      },
      "SubscriptionRequest": {
        "type": "object",
        "description": "Webhook registration request",
        "properties": {
          "callbackUrl": {
            "type": "string",
            "description": "The callback URL to receive events",
            "example": "https://your-callback.url/webhook"
          },
          "eventTypes": {
            "type": "array",
            "description": "One or more event selectors to subscribe to. A selector is either an exact event name (for example `v1.collection.payment_request.paid`) or a prefix ending in `.*` that subscribes to every event beneath it at any depth (`v1.collection.*`, `v1.collection.payment_request.*`, `v1.collection.payment_request.payment.*`, `v1.*`). Wildcards expand to the events your account can receive and automatically include event types added later under that prefix. Account owners can receive collection (`v1.collection.*`) and RFI (`v1.rfi.*`) events; partner accounts can also receive onboarding (`v1.onboarding.*`) and connection (`v1.connection.*`) events. An exact event name outside what your account can receive, or a selector that matches nothing, is rejected with a 400.",
            "items": {
              "type": "string",
              "example": "v1.collection.*",
              "minLength": 1,
              "pattern": "\\S"
            },
            "minItems": 1
          }
        },
        "required": [
          "callbackUrl",
          "eventTypes"
        ]
      },
      "SubscriptionResponse": {
        "type": "object",
        "description": "Webhook registration response",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of webhook subscription",
            "example": "5ed9fc67-7c25-418b-8240-b20822cd42ee"
          }
        },
        "required": [
          "id"
        ]
      },
      "AnswerEntry": {
        "type": "object",
        "properties": {
          "questionId": {
            "type": "string",
            "format": "uuid",
            "description": "Question UUID to answer."
          },
          "answer": {
            "type": "string",
            "description": "Free-text answer.",
            "minLength": 1
          }
        },
        "required": [
          "answer",
          "questionId"
        ]
      },
      "AttachmentEntry": {
        "type": "object",
        "properties": {
          "documentRequestId": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the document-request slot to attach to (same as `Rfi.documentRequests[].id`)."
          },
          "documentUploadIds": {
            "type": "array",
            "description": "One or more `DocumentUpload` UUIDs previously returned by `POST /v1/account/documents/upload`.",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 1
          }
        },
        "required": [
          "documentRequestId",
          "documentUploadIds"
        ]
      },
      "SubmitResponsesRequest": {
        "type": "object",
        "properties": {
          "answers": {
            "type": "array",
            "description": "Optional list of question answers to submit in this batch.",
            "items": {
              "$ref": "#/components/schemas/AnswerEntry"
            }
          },
          "attachments": {
            "type": "array",
            "description": "Optional list of document attachments to submit in this batch. Each entry's `documentRequestId` must match a `Rfi.documentRequests[].id` on the same RFI.",
            "items": {
              "$ref": "#/components/schemas/AttachmentEntry"
            }
          }
        }
      },
      "Rfi": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the RFI."
          },
          "caseNumber": {
            "type": "string",
            "description": "Human-readable case reference, e.g. `RFI-20260611-9F3A21B7`. Stable for the lifetime of the case and safe to quote to customers (in emails, support tickets, or your own UI). Immutable once issued."
          },
          "subjectType": {
            "type": "string",
            "description": "The subject the RFI is raised against.",
            "enum": [
              "ONBOARDING_APPLICATION",
              "TRANSACTION",
              "MULTI_TRANSACTION"
            ]
          },
          "subjectId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the subject. For `ONBOARDING_APPLICATION` this is the same value as `accountId`; for `TRANSACTION` it is the transaction id."
          },
          "subjectReference": {
            "type": "string",
            "description": "Human-readable reference for the subject. Null for onboarding-application RFIs."
          },
          "accountId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the account the RFI is associated with. For onboarding-application RFIs this is the same value as `subjectId`."
          },
          "status": {
            "type": "string",
            "description": "Lifecycle status of the RFI.",
            "enum": [
              "OPEN",
              "CLOSED",
              "CANCELLED"
            ]
          },
          "customerDisplayMessage": {
            "type": "string",
            "description": "Customer-facing message describing what's being asked."
          },
          "lastRespondedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of the most recent customer response. Null if none yet."
          },
          "closedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the RFI was closed. Null while OPEN."
          },
          "cancelledAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the RFI was cancelled. Null unless cancelled."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the RFI was created."
          },
          "questions": {
            "type": "array",
            "description": "Questions the customer must answer.",
            "items": {
              "$ref": "#/components/schemas/RfiQuestion"
            }
          },
          "documentRequests": {
            "type": "array",
            "description": "Document requests the customer must fulfil.",
            "items": {
              "$ref": "#/components/schemas/RfiDocumentRequest"
            }
          }
        }
      },
      "RfiDocumentRequest": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the document-request slot. Use this as `documentRequestId` when calling `POST /v1/rfi/{rfiId}/document-requests/{documentRequestId}/attach`."
          },
          "documentTypeId": {
            "type": "string",
            "format": "uuid",
            "description": "The document type the customer is being asked to provide."
          },
          "displayTitle": {
            "type": "string",
            "description": "Default title to display to the customer for this document request."
          },
          "customLabel": {
            "type": "string",
            "description": "Optional custom label that overrides the default title, if set by Hubpay."
          },
          "perItemDisplayMessage": {
            "type": "string",
            "description": "Optional per-item message that explains why this document is required."
          },
          "displayOrder": {
            "type": "integer",
            "format": "int32",
            "description": "Display order of the document request within the RFI."
          },
          "documentId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the document the customer has attached to this slot. Null while pending. This is the same UUID surfaced as `data.documentId` in `v1.rfi.document.*` webhook events. Persist `documentId → rfiId` at attach time so partners can correlate webhook events back to the parent RFI."
          },
          "documentStatus": {
            "type": "string",
            "description": "Review status of the attached document. Null while pending.",
            "enum": [
              "NOT_SUBMITTED",
              "PENDING_REVIEW",
              "DECLINED",
              "APPROVED",
              "PENDING_VERIFICATION",
              "VALIDATION_WARNINGS"
            ]
          },
          "documentUploads": {
            "type": "array",
            "description": "The files attached to this slot. Empty list when nothing has been attached yet.",
            "items": {
              "$ref": "#/components/schemas/DocumentUpload"
            }
          }
        }
      },
      "RfiQuestion": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the question."
          },
          "prompt": {
            "type": "string",
            "description": "The question prompt to display to the customer."
          },
          "displayOrder": {
            "type": "integer",
            "format": "int32",
            "description": "Display order of the question within the RFI."
          },
          "answer": {
            "type": "string",
            "description": "The customer's answer, if one has been submitted. Null while pending."
          },
          "answeredAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the answer was submitted. Null while pending."
          }
        }
      },
      "AnswerQuestionRequest": {
        "type": "object",
        "properties": {
          "answer": {
            "type": "string",
            "description": "The customer's free-text answer to the question. Subsequent calls replace the previous answer.",
            "minLength": 1
          }
        },
        "required": [
          "answer"
        ]
      },
      "AttachDocumentsRequest": {
        "type": "object",
        "properties": {
          "documentUploadIds": {
            "type": "array",
            "description": "One or more `DocumentUpload` UUIDs previously returned by `POST /v1/account/documents/upload`. The uploaded files are merged into a single document whose UUID surfaces as `documentId` on the parent document-request slot and as `data.documentId` in `v1.rfi.document.*` webhook events.",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 1
          }
        },
        "required": [
          "documentUploadIds"
        ]
      },
      "CancelRfiRequest": {
        "type": "object",
        "properties": {
          "cancellationReason": {
            "type": "string",
            "description": "Reason for cancellation.",
            "minLength": 1
          }
        },
        "required": [
          "cancellationReason"
        ]
      },
      "OpenRfiDocumentRequest": {
        "type": "object",
        "properties": {
          "customLabel": {
            "type": "string",
            "description": "Free-text description of the document the customer is being asked to provide (e.g. \"Latest bank statement covering the last 3 months\"). Shown to the customer alongside the request.",
            "minLength": 1
          },
          "perItemDisplayMessage": {
            "type": "string",
            "description": "Optional per-item message explaining why this document is required."
          }
        },
        "required": [
          "customLabel"
        ]
      },
      "OpenRfiQuestion": {
        "type": "object",
        "properties": {
          "prompt": {
            "type": "string",
            "description": "The question prompt shown to the customer.",
            "minLength": 1
          }
        },
        "required": [
          "prompt"
        ]
      },
      "OpenRfiRequest": {
        "type": "object",
        "properties": {
          "subjectType": {
            "type": "string",
            "description": "The subject the RFI is raised against.",
            "enum": [
              "ONBOARDING_APPLICATION",
              "TRANSACTION",
              "MULTI_TRANSACTION"
            ]
          },
          "subjectId": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the subject. For `ONBOARDING_APPLICATION` this is the same value as the `AccountId` header; for `TRANSACTION` it is the transaction id."
          },
          "subjectReference": {
            "type": "string",
            "description": "Human-readable subject reference. Required when `subjectType=TRANSACTION`."
          },
          "customerDisplayMessage": {
            "type": "string",
            "description": "Customer-facing message explaining what the RFI is about."
          },
          "questions": {
            "type": "array",
            "description": "Questions the customer must answer. At least one question or one document request must be provided.",
            "items": {
              "$ref": "#/components/schemas/OpenRfiQuestion"
            }
          },
          "documentRequests": {
            "type": "array",
            "description": "Document requests the customer must fulfil. At least one question or one document request must be provided.",
            "items": {
              "$ref": "#/components/schemas/OpenRfiDocumentRequest"
            }
          }
        },
        "required": [
          "subjectId",
          "subjectType"
        ]
      },
      "CreatePaymentsRequest": {
        "type": "object",
        "description": "Request for creating payments",
        "properties": {
          "payments": {
            "type": "array",
            "description": "List of payment properties for creating payments",
            "items": {
              "$ref": "#/components/schemas/PaymentProperties"
            },
            "minItems": 1
          }
        },
        "required": [
          "payments"
        ]
      },
      "File": {
        "type": "object",
        "properties": {
          "mediaType": {
            "type": "string",
            "description": "The MIME type of the file, such as 'application/pdf' for a PDF file or 'image/jpeg' for a JPEG image",
            "example": "application/pdf",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "description": "The name of the file, including the file extension",
            "example": "document.pdf",
            "minLength": 1
          },
          "base64EncodedFile": {
            "type": "string",
            "description": "The content of the file, encoded as a Base64 string",
            "example": "iVBORw0KG...",
            "minLength": 1,
            "writeOnly": true
          }
        },
        "required": [
          "base64EncodedFile",
          "mediaType",
          "name"
        ]
      },
      "Money": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "description": "The specific monetary value that is being converted from in the currency exchange",
            "example": 100
          },
          "currency": {
            "type": "string",
            "description": "The type of currency that the money is being exchanged from",
            "example": "USD",
            "minLength": 1,
            "pattern": "[A-Z]{3}"
          }
        },
        "required": [
          "amount",
          "currency"
        ]
      },
      "PaymentProperties": {
        "type": "object",
        "description": "Properties of a payment",
        "properties": {
          "externalId": {
            "type": "string",
            "description": "External ID of the payment",
            "example": "EXT123",
            "minLength": 1
          },
          "quoteId": {
            "type": "string",
            "format": "uuid",
            "description": "Quote ID associated with the payment",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "amount": {
            "$ref": "#/components/schemas/Money",
            "description": "Amount of the payment"
          },
          "reference": {
            "type": "string",
            "description": "Reference for the payment",
            "example": "REF123",
            "minLength": 1
          },
          "purposeOfPayment": {
            "type": "string",
            "description": "Purpose of the payment",
            "enum": [
              "COMPUTER_SERVICES",
              "FAMILY_SUPPORT",
              "EDUCATION",
              "MEDICAL_TREATMENT",
              "MAINTENANCE_EXPENSES",
              "TRAVEL",
              "SMALL_VALUE_REMITTANCE",
              "CONSTRUCTION_EXPENSES",
              "HOTEL_ACCOMMODATION",
              "ADVERTISING_EXPENSES",
              "ADVISORY_FEES",
              "BUSINESS_INSURANCE",
              "INSURANCE_CLAIMS",
              "DELIVERY_FEES",
              "EXPORTED_GOODS",
              "SERVICE_CHARGES",
              "LOAN_PAYMENT",
              "OFFICE_EXPENSES",
              "PROPERTY_PURCHASE",
              "PROPERTY_RENTAL",
              "ROYALTY_FEES",
              "SHARES_INVESTMENT",
              "FUND_INVESTMENT",
              "TAX_PAYMENT",
              "TRANSPORTATION_FEES",
              "UTILITY_BILLS",
              "PERSONAL_TRANSFER",
              "SALARY_PAYMENT",
              "INFLUENCER_PAYMENT",
              "DIVIDEND_PAYMENT",
              "OTHER_FEES",
              "OTHER"
            ]
          },
          "beneficiaryId": {
            "type": "string",
            "format": "uuid",
            "description": "Beneficiary ID associated with the payment",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "documentReference": {
            "type": "string",
            "description": "Document reference associated with the payment",
            "example": "DOC123"
          },
          "document": {
            "$ref": "#/components/schemas/File",
            "description": "Document associated with the payment"
          }
        },
        "required": [
          "amount",
          "beneficiaryId",
          "externalId",
          "purposeOfPayment",
          "quoteId",
          "reference"
        ]
      },
      "PageMetadata": {
        "type": "object",
        "properties": {
          "size": {
            "type": "integer",
            "format": "int64"
          },
          "number": {
            "type": "integer",
            "format": "int64"
          },
          "totalElements": {
            "type": "integer",
            "format": "int64"
          },
          "totalPages": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "PagedModelPayment": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Payment"
            }
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        }
      },
      "Payment": {
        "type": "object",
        "description": "Payment details",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the payment",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "status": {
            "$ref": "#/components/schemas/PaymentStatus"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation time of the payment",
            "example": "2023-01-01T00:00:00Z"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Completion time of the payment",
            "example": "2023-01-01T00:00:00Z"
          },
          "externalId": {
            "type": "string",
            "description": "External ID of the payment",
            "example": "EXT123",
            "minLength": 1
          },
          "quoteId": {
            "type": "string",
            "format": "uuid",
            "description": "Quote ID associated with the payment",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "amount": {
            "$ref": "#/components/schemas/Money",
            "description": "Amount of the payment"
          },
          "reference": {
            "type": "string",
            "description": "Reference for the payment",
            "example": "REF123",
            "minLength": 1
          },
          "purposeOfPayment": {
            "type": "string",
            "description": "Purpose of the payment",
            "enum": [
              "COMPUTER_SERVICES",
              "FAMILY_SUPPORT",
              "EDUCATION",
              "MEDICAL_TREATMENT",
              "MAINTENANCE_EXPENSES",
              "TRAVEL",
              "SMALL_VALUE_REMITTANCE",
              "CONSTRUCTION_EXPENSES",
              "HOTEL_ACCOMMODATION",
              "ADVERTISING_EXPENSES",
              "ADVISORY_FEES",
              "BUSINESS_INSURANCE",
              "INSURANCE_CLAIMS",
              "DELIVERY_FEES",
              "EXPORTED_GOODS",
              "SERVICE_CHARGES",
              "LOAN_PAYMENT",
              "OFFICE_EXPENSES",
              "PROPERTY_PURCHASE",
              "PROPERTY_RENTAL",
              "ROYALTY_FEES",
              "SHARES_INVESTMENT",
              "FUND_INVESTMENT",
              "TAX_PAYMENT",
              "TRANSPORTATION_FEES",
              "UTILITY_BILLS",
              "PERSONAL_TRANSFER",
              "SALARY_PAYMENT",
              "INFLUENCER_PAYMENT",
              "DIVIDEND_PAYMENT",
              "OTHER_FEES",
              "OTHER"
            ]
          },
          "beneficiaryId": {
            "type": "string",
            "format": "uuid",
            "description": "Beneficiary ID associated with the payment",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "documentReference": {
            "type": "string",
            "description": "Document reference associated with the payment",
            "example": "DOC123"
          },
          "document": {
            "$ref": "#/components/schemas/File",
            "description": "Document associated with the payment"
          },
          "paymentProperties": {
            "description": "Payment properties object"
          }
        },
        "required": [
          "amount",
          "beneficiaryId",
          "createdAt",
          "externalId",
          "id",
          "purposeOfPayment",
          "quoteId",
          "reference"
        ]
      },
      "PaymentStatus": {
        "type": "object",
        "description": "Status of a payment",
        "properties": {
          "state": {
            "type": "string",
            "description": "State of the payment",
            "enum": [
              "DRAFT",
              "CANCELLED",
              "PENDING_APPROVAL",
              "DUE",
              "PAID"
            ]
          },
          "reason": {
            "type": "string",
            "description": "Reason for the payment status"
          },
          "complete": {
            "type": "boolean",
            "description": "Payment status",
            "example": false
          }
        },
        "required": [
          "state"
        ]
      },
      "PaymentQuoteRequest": {
        "type": "object",
        "description": "Payment quote request details",
        "properties": {
          "currency": {
            "type": "string",
            "description": "Currency for the payment quote request",
            "example": "AED",
            "pattern": "[A-Z]{3}"
          },
          "country": {
            "type": "string",
            "description": "Country for the payment quote request",
            "example": "AE"
          }
        },
        "required": [
          "country",
          "currency"
        ]
      },
      "PaymentQuote": {
        "type": "object",
        "description": "Payment quote details",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique ID of the payment quote",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "fee": {
            "$ref": "#/components/schemas/Money",
            "description": "Fee associated with the payment quote"
          }
        },
        "required": [
          "fee",
          "id"
        ]
      },
      "ExchangeQuoteRequest": {
        "type": "object",
        "description": "Request for an exchange quote",
        "properties": {
          "from": {
            "$ref": "#/components/schemas/Money",
            "description": "Details of the currency and amount being exchanged from"
          },
          "to": {
            "$ref": "#/components/schemas/Money",
            "description": "Details of the currency and amount being exchanged to"
          },
          "settlementDate": {
            "type": "string",
            "format": "date",
            "description": "Settlement date for the exchange quote",
            "example": "2023-12-31"
          }
        },
        "required": [
          "from",
          "settlementDate",
          "to"
        ]
      },
      "ExchangeQuote": {
        "type": "object",
        "description": "Exchange quote record",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique ID of the exchange quote"
          },
          "rate": {
            "$ref": "#/components/schemas/Rate",
            "description": "Rate of the exchange quote"
          },
          "from": {
            "$ref": "#/components/schemas/Money",
            "description": "The amount and currency being exchanged from"
          },
          "to": {
            "$ref": "#/components/schemas/Money",
            "description": "The amount and currency being exchanged to"
          },
          "expiresAt": {
            "type": "string",
            "format": "date",
            "description": "Expiration date of the exchange quote",
            "example": "2023-12-31"
          },
          "settlementDate": {
            "type": "string",
            "format": "date",
            "description": "Settlement date of the exchange quote",
            "example": "2023-12-31"
          }
        },
        "required": [
          "expiresAt",
          "from",
          "id",
          "rate",
          "settlementDate",
          "to"
        ]
      },
      "Rate": {
        "type": "object",
        "properties": {
          "price": {
            "type": "number"
          },
          "currencyPair": {
            "type": "string",
            "minLength": 1
          },
          "type": {
            "type": "string",
            "enum": [
              "BID",
              "OFFER"
            ]
          }
        },
        "required": [
          "currencyPair",
          "price",
          "type"
        ]
      },
      "ExchangeRequest": {
        "type": "object",
        "description": "Request for an exchange",
        "properties": {
          "quoteId": {
            "type": "string",
            "format": "uuid",
            "description": "The unique ID of the quote for the exchange",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "externalId": {
            "type": "string",
            "description": "A unique identifier for this request, generated by the client",
            "example": "clientGeneratedId"
          }
        },
        "required": [
          "externalId",
          "quoteId"
        ]
      },
      "Exchange": {
        "type": "object",
        "description": "Exchange record",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique ID of the exchange",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "shortId": {
            "type": "string",
            "description": "Short ID of the exchange",
            "example": "TR123",
            "minLength": 1
          },
          "externalId": {
            "type": "string",
            "description": "External ID of the exchange",
            "example": "EX123",
            "minLength": 1
          },
          "rate": {
            "$ref": "#/components/schemas/Rate",
            "description": "Rate of the exchange"
          },
          "from": {
            "$ref": "#/components/schemas/Money",
            "description": "Money from the exchange"
          },
          "to": {
            "$ref": "#/components/schemas/Money",
            "description": "Money to the exchange"
          },
          "settlementDate": {
            "type": "string",
            "format": "date",
            "description": "Settlement date of the exchange",
            "example": "2023-12-31"
          },
          "exchangeStatus": {
            "$ref": "#/components/schemas/ExchangeStatus",
            "description": "Status of the exchange"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation time of the exchange",
            "example": "2023-01-01T00:00:00Z"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Completion time of the exchange",
            "example": "2023-01-02T00:00:00Z"
          }
        },
        "required": [
          "createdAt",
          "exchangeStatus",
          "externalId",
          "from",
          "id",
          "rate",
          "settlementDate",
          "shortId",
          "to"
        ]
      },
      "ExchangeStatus": {
        "type": "object",
        "description": "Status of the exchange",
        "properties": {
          "state": {
            "type": "string",
            "description": "State of the exchange",
            "enum": [
              "DRAFT",
              "SUBMITTING",
              "UNKNOWN",
              "SUBMITTED",
              "ORDERED",
              "ORDER_SETTLED",
              "SUCCESS",
              "REJECTED",
              "FAILED",
              "CANCELLED"
            ],
            "example": "SUBMITTED"
          },
          "reason": {
            "type": "string",
            "description": "Reason for the exchange state",
            "enum": [
              "DRAFT",
              "SUBMITTING",
              "UNKNOWN",
              "SUBMITTED",
              "ORDERED",
              "ORDER_SETTLED",
              "SUCCESS",
              "REJECTED",
              "FAILED",
              "FAILED_BREACHES_LIMIT",
              "CANCELLED"
            ],
            "example": "REJECTED_BREACHES_LIMIT"
          },
          "complete": {
            "type": "boolean",
            "description": "Completion status of the exchange",
            "example": false
          }
        },
        "required": [
          "state"
        ]
      },
      "ConnectionRequest": {
        "type": "object",
        "description": "Request to create a partner app connection",
        "properties": {
          "scopes": {
            "type": "array",
            "description": "Scopes the partner is requesting for the connection",
            "items": {
              "type": "string",
              "enum": [
                "WALLET_BALANCE_READ",
                "FUNDING_ACCOUNT_READ",
                "COLLECTIONS_WRITE"
              ]
            },
            "minItems": 1,
            "uniqueItems": true
          },
          "accountEmail": {
            "type": "string",
            "format": "email",
            "description": "The email address the end-user uses with the partner. Optional. Forwarded to Hubpay, where it may be used to validate the connection at accept time.",
            "example": "user@partner-app.com",
            "maxLength": 255,
            "minLength": 1
          }
        },
        "required": [
          "scopes"
        ]
      },
      "ConnectionRequestResponse": {
        "type": "object",
        "description": "Result of creating a partner app connection request",
        "properties": {
          "connectionId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the created connection"
          },
          "token": {
            "type": "string",
            "description": "Token to be exchanged in the Hubpay Business app"
          },
          "deepLink": {
            "type": "string",
            "description": "Deep link into the Hubpay Business app to complete the connection"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the connection request token expires",
            "example": "2026-01-01T00:00:00Z"
          }
        }
      },
      "SimulatePaymentRequest": {
        "type": "object",
        "description": "Request to simulate a payment against a payment request in sandbox environments",
        "properties": {
          "paymentRequestReference": {
            "type": "string",
            "description": "Identifies the payment request. Supply any one of:\n- the `id` returned by `POST /v1/collections/payment-requests`\n- your client-provided `externalId`\n- Hubpay's `paymentLinkReference` (the reference in the payment URL)\n\nThe legacy JSON field name `paymentRequestId` is also accepted.\n",
            "example": "REQ-123456",
            "minLength": 1
          },
          "paymentMethod": {
            "type": "string",
            "description": "The payment method to simulate",
            "enum": [
              "BANK_TRANSFER",
              "CRYPTO",
              "CARD"
            ],
            "example": "BANK_TRANSFER"
          },
          "amount": {
            "type": "number",
            "description": "Amount to simulate. If omitted, the full remaining balance is used",
            "example": 1000.0
          },
          "cryptoCurrency": {
            "type": "string",
            "description": "Cryptocurrency to simulate (USDT or USDC). Defaults to USDT. Only applicable when paymentMethod is CRYPTO",
            "example": "USDT"
          }
        },
        "required": [
          "paymentMethod",
          "paymentRequestReference"
        ]
      },
      "SimulatePaymentResponse": {
        "type": "object",
        "description": "Result of a simulated payment in sandbox environments",
        "properties": {
          "paymentRequestId": {
            "type": "string",
            "format": "uuid",
            "description": "The payment request ID"
          },
          "paymentId": {
            "type": "string",
            "format": "uuid",
            "description": "The ID of the simulated payment. Use this to query payment details via GET /v1/collections/payment-requests/{paymentRequestId}"
          },
          "paymentReference": {
            "type": "string",
            "description": "The unique reference for the simulated payment"
          },
          "paymentMethod": {
            "type": "string",
            "description": "The payment method that was simulated",
            "enum": [
              "BANK_TRANSFER",
              "CRYPTO",
              "CARD"
            ]
          },
          "amount": {
            "type": "number",
            "description": "The amount that was simulated"
          },
          "currency": {
            "type": "string",
            "description": "The currency of the payment",
            "example": "AED"
          },
          "paymentRequestStatus": {
            "type": "string",
            "description": "The updated status of the payment request after simulation (PAID or PART_PAID)"
          }
        }
      },
      "SimulatePaymentCompletionRequest": {
        "type": "object",
        "description": "Request to complete an existing sandbox crypto payment in sandbox environments",
        "properties": {
          "paymentRequestReference": {
            "type": "string",
            "description": "Identifies the payment request. Supply any one of: its paymentLinkReference (shown in the payment URL, e.g. AH-LGWO-MGYL), its Hubpay id (the UUID from the create response), or your own externalId. The legacy JSON field name paymentRequestId is also accepted.",
            "example": "AH-LGWO-MGYL",
            "minLength": 1
          },
          "paymentId": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the crypto payment to complete: the id of the entry in the payment request's payments array, or paymentId returned by simulate-crypto-deposit. The deposit must be confirmed; a newly created checkout quote is not enough.",
            "example": "e9df7b8b-2276-4941-9f87-c4b556c5382d"
          }
        },
        "required": [
          "paymentId",
          "paymentRequestReference"
        ]
      },
      "SimulatePaymentCompletionResponse": {
        "type": "object",
        "description": "Result of completing an existing sandbox crypto payment",
        "properties": {
          "paymentRequestId": {
            "type": "string",
            "format": "uuid",
            "description": "The payment request ID"
          },
          "paymentId": {
            "type": "string",
            "format": "uuid",
            "description": "The completed crypto payment ID"
          },
          "paymentStatus": {
            "type": "string",
            "description": "The resulting public payment status",
            "example": "COMPLETE"
          },
          "paymentRequestStatus": {
            "type": "string",
            "description": "The payment request status",
            "example": "PAID"
          },
          "alreadyCompleted": {
            "type": "boolean",
            "description": "True when this payment had already been completed by an earlier request"
          },
          "message": {
            "type": "string",
            "description": "Human-readable result"
          }
        }
      },
      "SimulateExpiryRequest": {
        "type": "object",
        "description": "Advance one sandbox expiry clock without waiting for its timer",
        "properties": {
          "paymentRequestReference": {
            "type": "string",
            "description": "Payment request UUID, your externalId, or the paymentLinkReference. The JSON field paymentRequestId is also accepted.",
            "example": "ORDER-10045",
            "minLength": 1
          },
          "target": {
            "type": "string",
            "description": "CRYPTO_QUOTE expires a quote without settling it. PAYMENT_DEADLINE stops new attempts while retaining the closing window. PAYMENT_REQUEST runs final expiry checks; a pending payment can keep the request open.",
            "enum": [
              "CRYPTO_QUOTE",
              "PAYMENT_DEADLINE",
              "PAYMENT_REQUEST"
            ],
            "example": "CRYPTO_QUOTE"
          },
          "quotePaymentId": {
            "type": "string",
            "format": "uuid",
            "description": "Optional for CRYPTO_QUOTE: omit to expire the latest quote for the payment request. Omit for PAYMENT_DEADLINE and PAYMENT_REQUEST."
          }
        },
        "required": [
          "paymentRequestReference",
          "target"
        ]
      },
      "SimulateExpiryResponse": {
        "type": "object",
        "description": "Actual request state and expiry clocks after the simulation. An expiry request does not guarantee an EXPIRED status.",
        "properties": {
          "paymentRequestId": {
            "type": "string",
            "format": "uuid"
          },
          "paymentRequestStatus": {
            "type": "string"
          },
          "target": {
            "type": "string",
            "enum": [
              "CRYPTO_QUOTE",
              "PAYMENT_DEADLINE",
              "PAYMENT_REQUEST"
            ]
          },
          "quotePaymentId": {
            "type": "string",
            "format": "uuid"
          },
          "quoteExpiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "Provider quote expiry, when a quote was targeted"
          },
          "displayExpiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "Checkout quote countdown expiry, when a quote was targeted"
          },
          "paymentRequestExpiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "Final payment request expiry, if configured"
          },
          "newPaymentsDeadline": {
            "type": "string",
            "format": "date-time",
            "description": "Deadline for starting new payment attempts, if configured"
          }
        }
      },
      "SimulateCryptoDepositRequest": {
        "type": "object",
        "description": "Simulate a deposit against an existing sandbox checkout crypto quote",
        "properties": {
          "paymentRequestReference": {
            "type": "string",
            "description": "Payment request UUID, your externalId, or the paymentLinkReference. The JSON field paymentRequestId is also accepted.",
            "example": "ORDER-10045",
            "minLength": 1
          },
          "quotePaymentId": {
            "type": "string",
            "format": "uuid",
            "description": "Optional quote ID. Omit to use the latest quote for this payment request. A retry uses the original deposit quote. The response includes the selected quotePaymentId."
          },
          "depositId": {
            "type": "string",
            "format": "uuid",
            "description": "Client-generated UUID for one deposit. Reuse it to retry or confirm the original deposit with its original quote and amount. Use a new ID for each additional deposit."
          },
          "cryptoAmount": {
            "type": "number",
            "description": "Optional exact amount in cryptocurrency. Supply this or percentageOfRemaining, not both. Omit both to pay the quote amount remaining after pending and confirmed deposits.",
            "example": 10.25
          },
          "status": {
            "type": "string",
            "description": "PENDING detects a deposit without receiving funds; CONFIRMED receives funds but does not credit the wallet. A confirmed deposit never regresses on retry.",
            "enum": [
              "PENDING",
              "CONFIRMED"
            ]
          },
          "percentageOfRemaining": {
            "type": "number",
            "description": "Optional percentage of the quote remaining after pending and confirmed deposits. Greater than 0 and at most 100, with up to 6 decimal places. Calculated only for a new deposit.",
            "example": 50,
            "maximum": 100,
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "depositId",
          "paymentRequestReference",
          "status"
        ]
      },
      "SimulateCryptoDepositResponse": {
        "type": "object",
        "description": "Current state of the simulated deposit and its payment request",
        "properties": {
          "paymentRequestId": {
            "type": "string",
            "format": "uuid"
          },
          "quotePaymentId": {
            "type": "string",
            "format": "uuid",
            "description": "Primary payment ID identifying the quote round"
          },
          "paymentId": {
            "type": "string",
            "format": "uuid",
            "description": "Payment ID for this deposit; use it with simulate-payment-completion"
          },
          "depositId": {
            "type": "string",
            "format": "uuid"
          },
          "cryptoAmount": {
            "type": "number"
          },
          "depositStatus": {
            "type": "string",
            "enum": [
              "NONE",
              "DETECTED",
              "CONFIRMED"
            ],
            "example": "CONFIRMED"
          },
          "paymentStatus": {
            "type": "string",
            "example": "RECEIVED"
          },
          "paymentRequestStatus": {
            "type": "string",
            "example": "PART_PAID"
          },
          "alreadyProcessed": {
            "type": "boolean",
            "description": "True when this deposit had already reached the requested state"
          }
        }
      },
      "PayerCreateRequest": {
        "type": "object",
        "properties": {
          "externalId": {
            "type": "string",
            "description": "External ID of the payer",
            "example": "EX123",
            "maxLength": 36,
            "minLength": 0
          },
          "type": {
            "type": "string",
            "description": "The type of the payer",
            "enum": [
              "INDIVIDUAL",
              "BUSINESS"
            ]
          },
          "fullLegalName": {
            "type": "string",
            "description": "Full legal name of the payer",
            "maxLength": 255,
            "minLength": 0
          },
          "emailAddress": {
            "type": "string",
            "format": "email",
            "description": "Email address of the payer. Optional. Required to refresh the payment session for a crypto-enabled payment request.",
            "maxLength": 255,
            "minLength": 0
          },
          "phoneNumber": {
            "type": "string",
            "description": "Required if payer is crypto enabled",
            "maxLength": 255,
            "minLength": 0
          },
          "country": {
            "type": "string",
            "description": "Country of the payer",
            "minLength": 1
          },
          "notificationEnabled": {
            "type": "boolean",
            "description": "Enable to send transaction-update emails to this payer"
          },
          "address": {
            "type": "string",
            "description": "Required if payer is crypto enabled",
            "maxLength": 255,
            "minLength": 0
          },
          "areaOrCity": {
            "type": "string",
            "description": "Required if payer is crypto enabled and type INDIVIDUAL",
            "maxLength": 255,
            "minLength": 0
          },
          "provinceOrState": {
            "type": "string",
            "description": "Required if payer is crypto enabled and type BUSINESS",
            "maxLength": 255,
            "minLength": 0
          },
          "postalCode": {
            "type": "string",
            "description": "Required for a crypto-enabled BUSINESS payer outside the UAE. Optional when the payer country is AE. Leave it blank if not applicable; do not send N/A or a made-up postcode.",
            "maxLength": 255,
            "minLength": 0
          },
          "registrationNumber": {
            "type": "string",
            "description": "Optional corporate registration number for a BUSINESS payer. Supply it when known for a crypto-enabled payer to avoid requesting it during checkout.",
            "maxLength": 255,
            "minLength": 0
          },
          "identificationDocumentType": {
            "type": "string",
            "description": "Optional identification document type for an INDIVIDUAL payer. Supply it when known for a crypto-enabled payer to avoid requesting it during checkout. Must be provided with `identificationDocumentNumber`.",
            "enum": [
              "NATIONAL_ID",
              "PASSPORT",
              "DRIVING_LICENSE"
            ]
          },
          "identificationDocumentNumber": {
            "type": "string",
            "description": "Optional identification document number for an INDIVIDUAL payer. Supply it when known for a crypto-enabled payer to avoid requesting it during checkout. Must be provided with `identificationDocumentType`.",
            "maxLength": 255,
            "minLength": 0
          },
          "cryptoEnabled": {
            "type": "boolean",
            "description": "Set to true to allow this payer to make cryptocurrency payments"
          }
        },
        "required": [
          "country",
          "cryptoEnabled",
          "externalId",
          "fullLegalName",
          "type"
        ]
      },
      "PaymentRequestCreateRequest": {
        "type": "object",
        "description": "Payload for creating a new payment request",
        "properties": {
          "executionMode": {
            "type": "string",
            "description": "How the payer completes the payment: PAYMENT_LINK is shareable, HOSTED_PAGE is a standalone Hubpay page, and EMBEDDED is compact checkout contained in a website iframe or direct native WebView",
            "enum": [
              "PAYMENT_LINK",
              "HOSTED_PAGE",
              "EMBEDDED"
            ]
          },
          "externalId": {
            "type": "string",
            "description": "Client-provided identifier for idempotency or external tracking",
            "example": "REQ-123456",
            "maxLength": 255,
            "minLength": 0
          },
          "payerId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of an existing payer. Provide either `payerId` or `payer`, but not both.\n",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "payer": {
            "$ref": "#/components/schemas/PayerCreateRequest",
            "description": "Inline payer details to create a new payer along with the payment request.\nProvide either `payer` or `payerId`, but not both.\nFor crypto payments, supply any payer identification you already hold here so checkout asks the payer only when information is missing.\n"
          },
          "currency": {
            "type": "string",
            "description": "ISO 4217 or crypto currency code for settlement",
            "example": "AED",
            "maxLength": 5,
            "minLength": 0,
            "pattern": "[A-Z]{3,5}"
          },
          "amount": {
            "type": "number",
            "description": "Amount expected to be received",
            "example": 99.99
          },
          "dueDate": {
            "type": "string",
            "format": "date",
            "description": "Optional due date for the payment to be completed",
            "example": "2025-06-30"
          },
          "documentReference": {
            "type": "string",
            "description": "Document reference such as an invoice or PO number",
            "example": "INV-2025-001",
            "maxLength": 255,
            "minLength": 0
          },
          "documentId": {
            "type": "string",
            "format": "uuid",
            "description": "UUID of the uploaded document associated with this payment request. May be required based on merchant configuration and selected payment method(s).",
            "example": "123e4567-e89b-12d3-a456-426614174000"
          },
          "paymentMethods": {
            "type": "array",
            "description": "List of accepted payment methods for the payer",
            "example": [
              "CARD",
              "CRYPTO"
            ],
            "items": {
              "type": "string",
              "enum": [
                "CARD",
                "BANK_TRANSFER",
                "CRYPTO"
              ]
            },
            "minItems": 1
          },
          "successRedirectUrl": {
            "type": "string",
            "description": "URL to redirect the payer when they have successfully completed their payment journey.\n\n**Important:** This redirect does NOT confirm that funds have been received. For asynchronous\npayment methods like bank transfers, the payer may have successfully submitted payment\ninstructions, but funds may not yet be received by Hubpay.\n\n**Always verify payment status** via webhooks or API lookup before fulfilling orders or\nproviding services.\n\nHubpay will append `paymentRequestId` and `paymentId` as query parameters to this URL\nduring the **redirect flow only**.\n",
            "example": "https://example.com/success",
            "maxLength": 255,
            "minLength": 0
          },
          "cancelRedirectUrl": {
            "type": "string",
            "description": "URL the payer is returned to when they cancel or leave the payment page, or when a hosted payment request expires unpaid. Arrival is not proof of cancellation; verify the request status via webhook or API.",
            "example": "https://example.com/cancel",
            "maxLength": 255,
            "minLength": 0
          },
          "autoSendPaymentLink": {
            "type": "boolean",
            "default": false,
            "description": "When true, the payment link will be automatically sent to the payer's email address upon creation.\n"
          },
          "payoutDetails": {
            "$ref": "#/components/schemas/PayoutDetails",
            "description": "Details for payout to a beneficiary.\nIf this is provided then evey payment made against this request will be paid out to the provided beneficiary.\nOmit this object to have funds settled to your Hubpay wallet.\n"
          }
        },
        "required": [
          "amount",
          "currency",
          "documentReference",
          "executionMode",
          "externalId",
          "paymentMethods"
        ]
      },
      "AccountCreateRequest": {
        "type": "object",
        "properties": {
          "accountType": {
            "type": "string",
            "description": "Account type.",
            "enum": [
              "INDIVIDUAL",
              "BUSINESS"
            ]
          },
          "accountName": {
            "type": "string",
            "description": "Name of account.",
            "maxLength": 100,
            "minLength": 0,
            "pattern": "^[a-zA-Z0-9\\s\\-\\.&]+$"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Email address.",
            "maxLength": 255,
            "minLength": 0
          },
          "phoneNumber": {
            "type": "string",
            "description": "Phone number of customer (preferably mobile).",
            "maxLength": 30,
            "minLength": 0
          },
          "countryCode": {
            "type": "string",
            "description": "Country of residence for INDIVIDUAL. Country of registration for BUSINESS.",
            "example": "GB",
            "minLength": 1
          },
          "externalId": {
            "type": "string",
            "description": "Client-provided identifier for the account. Used for idempotency and external reference.",
            "maxLength": 36,
            "minLength": 0
          }
        },
        "required": [
          "accountName",
          "accountType",
          "countryCode",
          "externalId",
          "phoneNumber"
        ]
      },
      "CreateInviteRequest": {
        "type": "object",
        "description": "Request to invite a user to the account",
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "description": "Email address of the user to invite",
            "maxLength": 255,
            "minLength": 0
          },
          "fullName": {
            "type": "string",
            "description": "Full name of the user to invite",
            "maxLength": 255,
            "minLength": 0
          },
          "role": {
            "type": "string",
            "description": "User role within the account.\n\n- **OWNER**: Full account access. Can manage users, accept terms and conditions, and approve own transactions.\n- **ADMIN**: Full operational access. Can approve own transactions but cannot manage users.\n- **EXECUTOR**: Can create and approve payments and transfers. Cannot approve own transactions (segregation of duties).\n- **PREPARER**: Can draft payments and manage beneficiaries. Cannot execute or approve transactions.\n- **VIEWER**: Read-only access.\n",
            "enum": [
              "OWNER",
              "ADMIN",
              "EXECUTOR",
              "PREPARER",
              "VIEWER"
            ]
          }
        },
        "required": [
          "email",
          "fullName",
          "role"
        ]
      },
      "CreateInviteResponse": {
        "type": "object",
        "description": "Response after creating or resending a user invite",
        "properties": {
          "inviteId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the invite"
          },
          "inviteUrl": {
            "type": "string",
            "description": "URL the invited user should visit to accept the invite"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the invite expires. Invite links expire 14 days after creation."
          }
        }
      },
      "AccountDocumentRequest": {
        "type": "object",
        "properties": {
          "documentType": {
            "type": "string",
            "description": "Document type identifier for the document requirement.\nSee [Get document requirements API](https://docs.hubpay.io/docs/financial-gateway-api/get-document-requirements)\n\nAllowed values:\n- **TRADE_LICENSE**: Valid Trade/Commercial license\n- **MEMORANDUM_OF_ASSOCIATION_OR_ARTICLES_OF_ASSOCIATION**: Memorandum of Association or Articles of Association\n- **CERTIFICATE_OF_INCUMBENCY**: Certificate of Incumbency\n- **BUSINESS_PROOF_OF_ADDRESS**: Valid proof of business address\n- **POWER_OF_ATTORNEY**: Power of attorney or Board resolution\n- **BANK_STATEMENT**: 3 months bank statement\n- **LATEST_AUDITED_FINANCIAL_STATEMENTS**: Latest Audited Financial Statements\n- **LETTER_OF_AUTHORISATION_WITH_TERMS_AND_CONDITIONS**: Letter of Authorisation (with Terms and Conditions)\n",
            "enum": [
              "TRADE_LICENSE",
              "MEMORANDUM_OF_ASSOCIATION_OR_ARTICLES_OF_ASSOCIATION",
              "CERTIFICATE_OF_INCUMBENCY",
              "BUSINESS_PROOF_OF_ADDRESS",
              "POWER_OF_ATTORNEY",
              "BANK_STATEMENT",
              "LATEST_AUDITED_FINANCIAL_STATEMENTS",
              "LETTER_OF_AUTHORISATION_WITH_TERMS_AND_CONDITIONS",
              "INVESTMENT_AGREEMENT"
            ]
          },
          "documentUploadIds": {
            "type": "array",
            "description": "One or more document upload IDs associated with this document type. See /account/{id}/document/upload",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "minItems": 1
          }
        },
        "required": [
          "documentType",
          "documentUploadIds"
        ]
      },
      "AccountDocument": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "NOT_SUBMITTED",
              "PENDING_REVIEW",
              "DECLINED",
              "APPROVED",
              "PENDING_VERIFICATION",
              "VALIDATION_WARNINGS"
            ]
          },
          "required": {
            "type": "boolean"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "declinedReason": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "NOT_CERTIFIED",
              "INVALID_DOCUMENT_TYPE",
              "QUALITY",
              "OTHER_SEE_SUPPORT"
            ]
          },
          "declinedCustomerDisplayReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "validationStatus": {
            "type": [
              "string",
              "null"
            ],
            "description": "When status is VALIDATION_WARNINGS, the specific warning category from automated document review.",
            "enum": [
              "WARNING_NOT_CERTIFIED",
              "WARNING_SUSPECTED_INVALID_DOCUMENT_TYPE",
              "WARNING_QUALITY_INSUFFICIENT",
              "WARNING_EXPIRED_DOCUMENT",
              "WARNING_EXPIRING_DOCUMENT",
              "WARNING_OTHER",
              "WARNING_REQUIRED_FIELDS_MISSING",
              "CRITICAL_CERTAIN_INVALID_DOCUMENT_TYPE",
              "CRITICAL_DOCUMENT_UNREADABLE",
              "CRITICAL_OTHER"
            ]
          },
          "validationMessage": {
            "type": [
              "string",
              "null"
            ],
            "description": "When status is VALIDATION_WARNINGS, a human-readable warning message safe to show the end customer."
          },
          "lastUpdatedBy": {
            "type": [
              "string",
              "null"
            ]
          },
          "lastUpdatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "documentUploads": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentUpload"
            }
          },
          "documentType": {
            "type": "string",
            "description": "Document type identifier for the document requirement.\n\nAllowed values:\n- **TRADE_LICENSE**: Valid Trade/Commercial license\n- **MEMORANDUM_OF_ASSOCIATION_OR_ARTICLES_OF_ASSOCIATION**: Memorandum of Association or Articles of Association\n- **CERTIFICATE_OF_INCUMBENCY**: Certificate of Incumbency\n- **BUSINESS_PROOF_OF_ADDRESS**: Valid proof of business address\n- **POWER_OF_ATTORNEY**: Power of attorney or Board resolution\n- **BANK_STATEMENT**: 3 months bank statement\n- **LATEST_AUDITED_FINANCIAL_STATEMENTS**: Latest Audited Financial Statements\n- **LETTER_OF_AUTHORISATION_WITH_TERMS_AND_CONDITIONS**: Letter of Authorisation (with Terms and Conditions)\n",
            "enum": [
              "TRADE_LICENSE",
              "MEMORANDUM_OF_ASSOCIATION_OR_ARTICLES_OF_ASSOCIATION",
              "CERTIFICATE_OF_INCUMBENCY",
              "BUSINESS_PROOF_OF_ADDRESS",
              "POWER_OF_ATTORNEY",
              "BANK_STATEMENT",
              "LATEST_AUDITED_FINANCIAL_STATEMENTS",
              "LETTER_OF_AUTHORISATION_WITH_TERMS_AND_CONDITIONS",
              "INVESTMENT_AGREEMENT"
            ]
          }
        },
        "required": [
          "description",
          "documentType",
          "documentUploads",
          "id",
          "required",
          "status",
          "title"
        ]
      },
      "ApprovableDocument": {
        "type": "object",
        "properties": {
          "id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "NOT_SUBMITTED",
              "PENDING_REVIEW",
              "DECLINED",
              "APPROVED",
              "PENDING_VERIFICATION",
              "VALIDATION_WARNINGS"
            ]
          },
          "required": {
            "type": "boolean"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "declinedReason": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "NOT_CERTIFIED",
              "INVALID_DOCUMENT_TYPE",
              "QUALITY",
              "OTHER_SEE_SUPPORT"
            ]
          },
          "declinedCustomerDisplayReason": {
            "type": [
              "string",
              "null"
            ]
          },
          "validationStatus": {
            "type": [
              "string",
              "null"
            ],
            "description": "When status is VALIDATION_WARNINGS, the specific warning category from automated document review.",
            "enum": [
              "WARNING_NOT_CERTIFIED",
              "WARNING_SUSPECTED_INVALID_DOCUMENT_TYPE",
              "WARNING_QUALITY_INSUFFICIENT",
              "WARNING_EXPIRED_DOCUMENT",
              "WARNING_EXPIRING_DOCUMENT",
              "WARNING_OTHER",
              "WARNING_REQUIRED_FIELDS_MISSING",
              "CRITICAL_CERTAIN_INVALID_DOCUMENT_TYPE",
              "CRITICAL_DOCUMENT_UNREADABLE",
              "CRITICAL_OTHER"
            ]
          },
          "validationMessage": {
            "type": [
              "string",
              "null"
            ],
            "description": "When status is VALIDATION_WARNINGS, a human-readable warning message safe to show the end customer."
          },
          "lastUpdatedBy": {
            "type": [
              "string",
              "null"
            ]
          },
          "lastUpdatedAt": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "documentUploads": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentUpload"
            }
          }
        },
        "required": [
          "description",
          "documentUploads",
          "id",
          "required",
          "status",
          "title"
        ]
      },
      "ProblemDetail": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "format": "uri"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer",
            "format": "int32"
          },
          "detail": {
            "type": "string"
          },
          "instance": {
            "type": "string",
            "format": "uri"
          },
          "properties": {
            "type": "object",
            "additionalProperties": {}
          },
          "traceId": {
            "type": "string",
            "description": "Trace ID to provide when contacting Hubpay support",
            "example": "0af7651916cd43dd8448eb211c80319c"
          }
        }
      },
      "AuthRequest": {
        "type": "object",
        "description": "Request payload for client authentication",
        "properties": {
          "clientId": {
            "type": "string",
            "description": "The client ID issued to the consumer",
            "example": "your-client-id-123",
            "maxLength": 128,
            "minLength": 0
          },
          "clientSecret": {
            "type": "string",
            "description": "The client secret associated with the client ID",
            "example": "your-client-secret-abc",
            "maxLength": 256,
            "minLength": 0
          }
        },
        "required": [
          "clientId",
          "clientSecret"
        ]
      },
      "AuthResponse": {
        "type": "object",
        "description": "Response containing access token and metadata",
        "properties": {
          "access_token": {
            "type": "string",
            "description": "The JWT access token",
            "example": "eyJraWQiOiJ..."
          },
          "expires_in": {
            "type": "integer",
            "format": "int32",
            "description": "Time in seconds until the token expires",
            "example": 3600
          },
          "token_type": {
            "type": "string",
            "description": "The token type returned (usually 'Bearer')",
            "example": "Bearer"
          }
        }
      },
      "PagedModelWebhookRegister": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WebhookRegister"
            }
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        }
      },
      "WebhookRegister": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ownerUserAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid"
          },
          "appConnectionId": {
            "type": "string",
            "format": "uuid"
          },
          "endpointUrl": {
            "type": "string"
          },
          "algorithm": {
            "type": "string",
            "enum": [
              "SHA_256"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "INACTIVE"
            ]
          },
          "eventTypes": {
            "type": "array",
            "description": "Event selectors as registered: exact event names or prefix.* wildcards",
            "items": {
              "type": "string",
              "example": "v1.collection.*"
            }
          },
          "resolvedEventTypes": {
            "type": "array",
            "description": "Concrete event types the selectors currently resolve to. Grows automatically when new event types are added under a subscribed wildcard.",
            "items": {
              "type": "string",
              "example": "v1.collection.payment_request.paid"
            }
          }
        }
      },
      "SigningSecretResponse": {
        "type": "object",
        "description": "Webhook signing secret response",
        "properties": {
          "key": {
            "type": "string",
            "description": "The HMAC signing secret key used to verify webhook payload signatures"
          }
        },
        "required": [
          "key"
        ]
      },
      "PagedModelWalletBalance": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WalletBalance"
            }
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        }
      },
      "WalletBalance": {
        "type": "object",
        "description": "Details of a wallet and its balance information",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the wallet"
          },
          "currency": {
            "type": "string",
            "description": "Currency Code",
            "pattern": "[A-Z]{3}"
          },
          "availableBalance": {
            "type": "number",
            "description": "Available unallocated balance"
          },
          "pending": {
            "type": "number",
            "description": "Funds reserved/pending"
          },
          "expectedIncoming": {
            "type": "number",
            "description": "Funds expected incoming"
          },
          "expectedOutgoing": {
            "type": "number",
            "description": "Funds expected outgoing"
          },
          "due": {
            "type": "number",
            "description": "Total settlements due"
          }
        }
      },
      "PagedModelTransaction": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Transaction"
            }
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        }
      },
      "Transaction": {
        "type": "object",
        "description": "Transaction details",
        "properties": {
          "walletId": {
            "type": "string",
            "format": "uuid",
            "description": "Wallet ID of the transaction",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique ID of the transaction",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "shortId": {
            "type": "string",
            "description": "Short ID of the transaction",
            "example": "TR123"
          },
          "externalId": {
            "type": "string",
            "description": "External ID of the transaction",
            "example": "EXT123"
          },
          "type": {
            "type": "string",
            "description": "Type of the transaction",
            "enum": [
              "PAYMENT",
              "DEPOSIT",
              "CHARGE",
              "EXCHANGE",
              "OTHER_CREDIT_DEBIT"
            ],
            "example": "DEPOSIT"
          },
          "status": {
            "$ref": "#/components/schemas/TransactionStatus",
            "description": "Status of the transaction",
            "example": "COMPLETED"
          },
          "amount": {
            "$ref": "#/components/schemas/Money",
            "description": "Amount of the transaction"
          },
          "deposit": {
            "$ref": "#/components/schemas/TransactionDeposit",
            "description": "Details of the deposit transaction"
          },
          "payment": {
            "$ref": "#/components/schemas/TransactionPayment",
            "description": "Details of the payment transaction"
          },
          "exchange": {
            "$ref": "#/components/schemas/TransactionExchange",
            "description": "Details of the exchange transaction"
          },
          "charge": {
            "$ref": "#/components/schemas/TransactionCharge",
            "description": "Details of the charge transaction"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation time of the transaction",
            "example": "2023-01-01T00:00:00Z"
          },
          "completedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Completion time of the transaction",
            "example": "2023-01-01T00:00:00Z"
          }
        },
        "required": [
          "amount",
          "createdAt",
          "externalId",
          "id",
          "shortId",
          "status",
          "type",
          "walletId"
        ]
      },
      "TransactionCharge": {
        "type": "object",
        "description": "Details of the charge transaction",
        "properties": {
          "chargeForTransactionId": {
            "type": "string",
            "description": "Charge for the transaction ID",
            "example": "CHG123"
          }
        }
      },
      "TransactionDeposit": {
        "type": "object",
        "description": "Details of the deposit transaction",
        "properties": {
          "senderAccountIdentifier": {
            "type": "string",
            "description": "Sender's account identifier for the deposit",
            "example": "ACC123"
          },
          "senderName": {
            "type": "string",
            "description": "Name of the sender for the deposit",
            "example": "John Doe"
          },
          "senderReference": {
            "type": "string",
            "description": "Reference for the sender's deposit",
            "example": "REF123"
          }
        },
        "required": [
          "senderAccountIdentifier",
          "senderName",
          "senderReference"
        ]
      },
      "TransactionExchange": {
        "type": "object",
        "description": "Details of the exchange transaction",
        "properties": {
          "rate": {
            "$ref": "#/components/schemas/Rate",
            "description": "Rate of the exchange"
          },
          "from": {
            "$ref": "#/components/schemas/Money",
            "description": "Money from the exchange"
          },
          "to": {
            "$ref": "#/components/schemas/Money",
            "description": "Money to the exchange"
          }
        },
        "required": [
          "from",
          "rate",
          "to"
        ]
      },
      "TransactionPayment": {
        "type": "object",
        "description": "Details of the payment transaction",
        "properties": {
          "beneficiaryAccountIdentifier": {
            "type": "string",
            "description": "Beneficiary's account identifier for the payment",
            "example": "BEN123"
          },
          "beneficiaryName": {
            "type": "string",
            "description": "Name of the beneficiary for the payment",
            "example": "Jane Doe"
          },
          "paymentReference": {
            "type": "string",
            "description": "Reference for the payment",
            "example": "PAY123"
          }
        },
        "required": [
          "beneficiaryAccountIdentifier",
          "beneficiaryName",
          "paymentReference"
        ]
      },
      "TransactionStatus": {
        "type": "object",
        "description": "Status of the transaction",
        "properties": {
          "state": {
            "type": "string",
            "description": "State of the transaction",
            "enum": [
              "FUNDS_REQUIRED",
              "PENDING",
              "AWAITING_APPROVAL",
              "PROCESSING",
              "SUCCESS",
              "FAILED",
              "REVERSED"
            ],
            "example": "COMPLETED"
          },
          "reason": {
            "type": "string",
            "description": "Reason for the transaction state",
            "example": "LIMIT_REACHED"
          },
          "complete": {
            "type": "boolean",
            "description": "Completion status of the transaction",
            "example": true
          }
        },
        "required": [
          "state"
        ]
      },
      "RfiSummary": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the RFI."
          },
          "caseNumber": {
            "type": "string",
            "description": "Human-readable case reference, e.g. `RFI-20260611-9F3A21B7`. Stable for the lifetime of the case and safe to quote to customers."
          },
          "subjectType": {
            "type": "string",
            "description": "The subject the RFI is raised against.",
            "enum": [
              "ONBOARDING_APPLICATION",
              "TRANSACTION",
              "MULTI_TRANSACTION"
            ]
          },
          "subjectId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the subject. For `ONBOARDING_APPLICATION` this is the same value as `accountId`; for `TRANSACTION` it is the transaction id."
          },
          "subjectReference": {
            "type": "string",
            "description": "Human-readable reference for the subject. Null for onboarding-application RFIs."
          },
          "accountId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the account the RFI is associated with. For onboarding-application RFIs this is the same value as `subjectId`."
          },
          "status": {
            "type": "string",
            "description": "Lifecycle status of the RFI.",
            "enum": [
              "OPEN",
              "CLOSED",
              "CANCELLED"
            ]
          },
          "customerDisplayMessage": {
            "type": "string",
            "description": "Customer-facing message describing what's being asked."
          },
          "lastRespondedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of the most recent customer response. Null if none yet."
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the RFI was created."
          }
        }
      },
      "FundingAccountDetails": {
        "type": "object",
        "description": "Details of a funding account",
        "properties": {
          "accountNumber": {
            "type": "string",
            "description": "The bank account number, either an iban or an account number"
          },
          "routingCode": {
            "type": "string",
            "description": "Routing code for the bank, usually bic code"
          },
          "accountName": {
            "type": "string",
            "description": "Name of the beneficiary associated with the account"
          },
          "bankName": {
            "type": "string",
            "description": "Name of the bank"
          },
          "bankAddress": {
            "type": "string",
            "description": "Address of the bank"
          },
          "currency": {
            "type": "string",
            "description": "The currency of the funding account"
          },
          "paymentMethod": {
            "type": "string",
            "description": "The payment method supported by this bank account",
            "enum": [
              "Local Payment",
              "SWIFT Payment",
              "ACH Payment",
              "UK Faster Payment",
              "Fedwire Payment",
              "EFT Payment",
              "SEPA Payment"
            ]
          }
        }
      },
      "Connection": {
        "type": "object",
        "description": "A partner app connection and its current status",
        "properties": {
          "connectionId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the connection"
          },
          "partnerAccountId": {
            "type": "string",
            "format": "uuid",
            "description": "Account id of the partner that owns the connection"
          },
          "customerAccountId": {
            "type": "string",
            "format": "uuid",
            "description": "Account id of the connected customer, once accepted"
          },
          "status": {
            "type": "string",
            "description": "Current status of the connection",
            "enum": [
              "PENDING",
              "ACTIVE",
              "DECLINED",
              "REVOKED",
              "EXPIRED"
            ],
            "example": "ACTIVE"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "When a pending connection request expires",
            "example": "2026-01-01T00:00:00Z"
          },
          "acceptedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the customer accepted the connection",
            "example": "2026-01-01T00:00:00Z"
          },
          "revokedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the connection was revoked",
            "example": "2026-01-01T00:00:00Z"
          },
          "revokedBy": {
            "type": "string",
            "description": "Who revoked the connection"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the connection was created",
            "example": "2026-01-01T00:00:00Z"
          }
        }
      },
      "PagedModelConnection": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Connection"
            }
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        }
      },
      "CollectionRate": {
        "type": "object",
        "description": "Collection quote details",
        "properties": {
          "sourceType": {
            "type": "string",
            "description": "Source type",
            "enum": [
              "FIAT",
              "CRYPTO"
            ]
          },
          "sourceCurrency": {
            "type": "string",
            "description": "Currency the payer will send (fiat or crypto)",
            "example": "AED",
            "pattern": "[A-Z]{3,5}"
          },
          "sourceCountry": {
            "type": "string",
            "description": "Country of the payer",
            "example": "GB",
            "pattern": "[A-Z]{2}"
          },
          "destinationType": {
            "type": "string",
            "description": "Payment type: FIAT or CRYPTO",
            "enum": [
              "FIAT",
              "CRYPTO"
            ]
          },
          "destinationCurrency": {
            "type": "string",
            "description": "Currency of the collection. This is the amount credited to the destination account",
            "example": "AED",
            "pattern": "[A-Z]{3,5}"
          },
          "destinationAmount": {
            "type": "number",
            "description": "Collection amount to be received in the destination currency",
            "example": 1000.0,
            "minimum": 0.01
          },
          "sourceAmount": {
            "type": "number",
            "description": "Amount required to settle the payment in the source currency",
            "example": 1000.0,
            "minimum": 0.01
          },
          "exchangeRate": {
            "type": "number",
            "description": "Rate as multiplier from source to destination currency",
            "example": 1.59234
          }
        },
        "required": [
          "destinationAmount",
          "destinationCurrency",
          "destinationType",
          "sourceAmount",
          "sourceCountry",
          "sourceCurrency",
          "sourceType"
        ]
      },
      "PagedModelPaymentRequest": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentRequest"
            }
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        }
      },
      "PaymentReceipt": {
        "type": "object",
        "description": "Receipt file uploaded by a payer as proof of payment. Currently supports bank transfer receipts (e.g., screenshots, confirmations).",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier for the receipt",
            "example": "550e8400-e29b-41d4-a716-446655440001"
          },
          "fileName": {
            "type": "string",
            "description": "Original file name uploaded by the payer",
            "example": "bank-transfer-screenshot.pdf"
          },
          "contentType": {
            "type": "string",
            "description": "MIME content type",
            "example": "application/pdf"
          },
          "fileSize": {
            "type": "integer",
            "format": "int64",
            "description": "File size in bytes",
            "example": 245760
          },
          "uploadedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the payer uploaded the receipt",
            "example": "2025-11-06T10:30:00Z"
          },
          "downloadUrl": {
            "type": "string",
            "description": "Download URL for the receipt file",
            "example": "https://api.hubpay.io/v1/collections/payment-requests/payments/b0ae5614-2494-49fa-b075-8050b5eb84ba/receipts/550e8400-e29b-41d4-a716-446655440001/download"
          }
        }
      },
      "PaymentReceiptList": {
        "type": "object",
        "description": "List of receipts uploaded by payers for a specific payment. Currently supports bank transfer receipts (e.g., screenshots, confirmations).",
        "properties": {
          "paymentId": {
            "type": "string",
            "format": "uuid",
            "description": "Payment ID",
            "example": "b0ae5614-2494-49fa-b075-8050b5eb84ba"
          },
          "receipts": {
            "type": "array",
            "description": "List of receipt files uploaded by the payer",
            "items": {
              "$ref": "#/components/schemas/PaymentReceipt"
            }
          },
          "totalCount": {
            "type": "integer",
            "format": "int32",
            "description": "Total number of receipts",
            "example": 2
          }
        }
      },
      "PagedModelPayer": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Payer"
            }
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        }
      },
      "PagedModelBeneficiary": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Beneficiary"
            }
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        }
      },
      "InviteResponse": {
        "type": "object",
        "description": "Invite details",
        "properties": {
          "inviteId": {
            "type": "string",
            "format": "uuid",
            "description": "Unique identifier of the invite"
          },
          "maskedEmail": {
            "type": "string",
            "description": "Masked email address of the invited user"
          },
          "fullName": {
            "type": "string",
            "description": "Full name of the invited user"
          },
          "role": {
            "type": "string",
            "description": "Role assigned to the invited user",
            "enum": [
              "OWNER",
              "ADMIN",
              "EXECUTOR",
              "PREPARER",
              "VIEWER"
            ]
          },
          "inviteUrl": {
            "type": "string",
            "description": "URL the invited user should visit to accept the invite"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the invite expires. Invite links expire 14 days after creation."
          },
          "status": {
            "type": "string",
            "description": "Current status of the invite.\n\n- **PENDING**: Invite has been created and is waiting for the user to accept.\n- **COMPLETED**: Invite has been accepted and the user has been linked to the account.\n- **REVOKED**: Invite was revoked because a new invite was issued via resend.\n- **EXPIRED**: Invite has passed its 14-day expiry window and can no longer be used.\n- **LOCKED**: Invite is locked due to too many failed email verification attempts.\n",
            "enum": [
              "PENDING",
              "COMPLETED",
              "REVOKED",
              "EXPIRED",
              "LOCKED"
            ]
          }
        }
      },
      "PagedModelRelatedPerson": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RelatedPerson"
            }
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        }
      },
      "PagedModelRelatedCorporate": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RelatedCorporate"
            }
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        }
      },
      "PagedModelAccount": {
        "type": "object",
        "properties": {
          "content": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Account"
            }
          },
          "page": {
            "$ref": "#/components/schemas/PageMetadata"
          }
        }
      },
      "AccountDocumentsResponse": {
        "type": "object",
        "properties": {
          "accountDocuments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AccountDocument"
            }
          }
        },
        "required": [
          "accountDocuments"
        ]
      },
      "DocumentRequirement": {
        "type": "object",
        "properties": {
          "documentType": {
            "type": "string",
            "description": "Document type identifier for the document requirement.\n\nAllowed values:\n- **TRADE_LICENSE**: Valid Trade/Commercial license\n- **MEMORANDUM_OF_ASSOCIATION_OR_ARTICLES_OF_ASSOCIATION**: Memorandum of Association or Articles of Association\n- **CERTIFICATE_OF_INCUMBENCY**: Certificate of Incumbency\n- **BUSINESS_PROOF_OF_ADDRESS**: Valid proof of business address\n- **POWER_OF_ATTORNEY**: Power of attorney or Board resolution\n- **BANK_STATEMENT**: 3 months bank statement\n- **LATEST_AUDITED_FINANCIAL_STATEMENTS**: Latest Audited Financial Statements\n- **LETTER_OF_AUTHORISATION_WITH_TERMS_AND_CONDITIONS**: Letter of Authorisation (with Terms and Conditions)\n",
            "enum": [
              "TRADE_LICENSE",
              "MEMORANDUM_OF_ASSOCIATION_OR_ARTICLES_OF_ASSOCIATION",
              "CERTIFICATE_OF_INCUMBENCY",
              "BUSINESS_PROOF_OF_ADDRESS",
              "POWER_OF_ATTORNEY",
              "BANK_STATEMENT",
              "LATEST_AUDITED_FINANCIAL_STATEMENTS",
              "LETTER_OF_AUTHORISATION_WITH_TERMS_AND_CONDITIONS",
              "INVESTMENT_AGREEMENT"
            ]
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "required": {
            "type": "boolean"
          }
        },
        "required": [
          "description",
          "documentType",
          "required",
          "title"
        ]
      },
      "DocumentRequirementsResponse": {
        "type": "object",
        "properties": {
          "documentRequirements": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DocumentRequirement"
            }
          }
        },
        "required": [
          "documentRequirements"
        ]
      },
      "BusinessProfileResponse": {
        "type": "object",
        "properties": {
          "accountName": {
            "type": "string",
            "description": "Account name."
          },
          "countryOfRegistration": {
            "type": "string",
            "description": "Country of registration."
          },
          "industries": {
            "type": "array",
            "description": "Industry or industries in which the business operates.",
            "items": {
              "type": "string",
              "enum": [
                "GENERAL_TRADING",
                "MEDICAL_SUPPLIES",
                "AUTO_SPARE_PARTS",
                "RECRUITMENT",
                "TEXTILES",
                "MACHINERY_PARTS",
                "ADVISORY_FIRM",
                "CONSULTANCY",
                "HEALTHCARE_AND_DENTISTRY",
                "FOODSTUFF",
                "HOTEL_SUPPLIES",
                "SHIPPING_AND_TRANSPORT",
                "MEAT",
                "PERFUMES_TRADING",
                "WHOLESALERS",
                "PET_SUPPLIES_AND_FOODS",
                "AGRICULTURE_SUPPLIES",
                "FLOWER_SHOPS",
                "RAW_MATERIALS",
                "INFORMATION_TECHNOLOGY",
                "CHOCOLATE_AND_SWEETS",
                "MARINE_SUPPLIES",
                "EDUCATION",
                "ELECTRICAL_TRADING",
                "ACCOUNTING_TAXATION_PAYROLL_SERVICES",
                "ADULT_ENTERTAINMENT_AND_OR_PORNOGRAPHY",
                "ADVERTISING_MARKETING_AND_PR",
                "ADVOCACY_ORGANIZATIONS",
                "AEROSPACE_AND_DEFENSE",
                "AGRICULTURE",
                "AIRCRAFT_MANUFACTURER_AND_SPARE_PARTS",
                "AIRLINES",
                "AIR_CARGO",
                "AIRPORT_HARBOR_AND_TERMINAL_OPERATIONS",
                "ALCOHOLIC_BEVERAGES",
                "ALTERNATIVE_ENERGY_SOURCES",
                "AMUSEMENT_PARKS_AND_ATTRACTIONS",
                "ANIMAL_TRADING",
                "APPAREL_AND_ACCESSORIES_RETAILERS_AND_WHOLESALERS",
                "ARCHITECTURE_ENGINEERING_AND_DESIGN",
                "ARMS_MANUFACTURERS_AND_DEALERS",
                "AUCTION_SERVICES",
                "AUDIO_VIDEO_AND_PHOTOGRAPHY",
                "AUTOMOBILE_DEALERS_NEW_VEHICLES",
                "AUTOMOBILE_PARTS_WHOLESALERS",
                "AUTOMOTIVE_REPAIR_AND_MAINTENANCE",
                "BANKING_AND_FINANCIAL_SERVICES",
                "BEAUTY_SUPPLIES_AND_COSMETICS",
                "BIOTECHNOLOGY",
                "BLOOD_ORGANS_BODY_PARTS",
                "BOAT_AND_YACHT_DEALERS",
                "BUILDING_MATERIALS_CONCRETE_AND_GLASS",
                "CABLE_AND_TELEVISION_PROVIDERS",
                "CALL_CENTERS",
                "CAR_WASH_SERVICES",
                "CASINOS_GAMBLING_WAGERING_INSTITUTIONS_AND_ONLINE_GAMBLING",
                "CHEMICALS_PETROCHEMICALS_AND_PETROLEUM_PRODUCTS",
                "CLOTHING_AND_SHOE_STORES",
                "COLLEGES_AND_UNIVERSITIES",
                "COMPUTER_AND_ELECTRONICS",
                "COMMERCIAL_BROKERS",
                "COMPANY_SERVICE_PROVIDERS",
                "CONSTRUCTION_AND_REMODELING",
                "CONSTRUCTION_EQUIPMENT_AND_SUPPLIES",
                "CONSULTING_SERVICES",
                "COUNTERFEIT_PIRATED_GOODS",
                "CROWDFUNDING",
                "CRUISE_SHIP_OPERATIONS",
                "CRYPTO_CURRENCY_VIRTUAL_ASSETS_NFT",
                "CYBER_LOCKERS",
                "DATA_ANALYTICS_AND_MANAGEMENT",
                "DATA_AND_RECORDS_MANAGEMENT",
                "DATING_AGENCIES",
                "DEBT_COLLECTION_SERVICES",
                "DEPARTMENTAL_AND_GROCERY_STORES",
                "DIAGNOSTIC_LABORATORIES",
                "DIAMOND_GOLD_JEWELRY_PRECIOUS_METAL_AND_STONES_DEALERS",
                "DOCTORS_AND_HEALTH_CARE_PRACTITIONERS",
                "DRY_CLEANERS_AND_LAUNDRIES",
                "E_COMMERCE_AND_INTERNET_BUSINESS",
                "EDUCATION_SERVICES",
                "EMBASSIES_DIPLOMATIC_MISSIONS_AND_CONSULATE",
                "EXCHANGE_HOUSE",
                "FACILITIES_MANAGEMENT_AND_MAINTENANCE",
                "FISHING_HUNTING_AND_FORESTRY_AND_LOGGING",
                "FOLLOWER_AND_LIKE_FARMS",
                "FOOD_AND_BEVERAGE_SUPPLIERS",
                "FOOD_AND_DAIRY_PRODUCT_MANUFACTURING_AND_PACKAGING",
                "FLAVORS_AND_FRAGRANCES",
                "FREIGHT_HAULING_RAIL_AND_TRUCK",
                "FUNERAL_HOMES_AND_SERVICES",
                "FURNITURE_STORES_AND_MANUFACTURING",
                "GAMING",
                "GIFT_CARDS",
                "GENERAL_TRADING_OR_GOODS_WHOLESALERS",
                "GOVERNMENT_ORGANIZATIONS",
                "HACKING_MATERIALS",
                "HAIRDRESSERS_BARBER_SHOPS_AND_SALONS",
                "HARDWARE_AND_BUILDING_MATERIAL_DEALERS",
                "HEALTHCARE_AND_HOSPITALS",
                "HEAVY_EQUIPMENT_AND_MACHINERY_SPARE_PARTS_TRADING",
                "HOTELS",
                "HR_AND_RECRUITING_SERVICES",
                "INTERNATIONAL_BODIES_AND_ORGANIZATIONS",
                "INTERNET_PUBLISHING",
                "INVESTMENT",
                "IT_AND_NETWORK_SERVICES_AND_SUPPORT",
                "LAUNDRY_AND_DRY_CLEANING",
                "LAW_FIRMS_AND_LEGAL_SERVICES",
                "LENDING_AND_MORTGAGES",
                "LEASING_AIRCRAFTS",
                "LIBRARIES_ARCHIVES_AND_MUSEUMS",
                "LITIGATION_FINANCE_COMPANIES",
                "MACHINERY_AND_EQUIPMENT",
                "MARIJUANA_CANNABIS_INDUSTRY_AND_OTHER_RECREATIONAL_DRUG_INDUSTRIES",
                "MARINE_AND_INLAND_SHIPPING_AND_CARGO",
                "MARINE_EQUIPMENT_TRADING",
                "MASSAGE_PARLOURS",
                "MEAT_TRADERS",
                "MEDIA_AND_ENTERTAINMENT",
                "MEDICAL_DEVICES_AND_EQUIPMENT_MANUFACTURERS_AND_SUPPLIERS",
                "METAL_AND_MINERAL_WHOLESALERS",
                "MINING_AND_QUARRYING",
                "MONEY_BROKERS",
                "MONEY_SERVICES_BUSINESS_PAYMENT_SERVICES_PROVIDERS",
                "MOTION_PICTURE_AND_RECORDING_PRODUCERS",
                "MOVING_COMPANIES_AND_SERVICES",
                "MULTI_LEVEL_MARKETING_OR_PYRAMID_SCHEMES",
                "NAIL_SALONS",
                "NETWORK_EQUIPMENT_AND_SECURITY_PRODUCTS",
                "NEWSPAPER_BOOKS_AND_PERIODICALS_PUBLISHERS",
                "NIGHT_CLUBS",
                "NON_GOVERNMENT_ORGANIZATIONS_CHARITIES_OR_TRUSTS",
                "OFFICE_EQUIPMENT_AND_SUPPLIERS_AND_WHOLESALERS",
                "OIL_AND_GAS",
                "OIL_AND_GAS_MACHINERY_AND_EQUIPMENT",
                "PAPER_AND_PAPER_PRODUCTS",
                "PARKING_LOTS_AND_GARAGE_MANAGEMENT",
                "PAWN_BROKERS_AND_SHOPS",
                "PAYDAY_LOAN_COMPANIES",
                "PENSION_FUNDS",
                "PHARMACEUTICALS",
                "PLASTIC_WHOLESALER",
                "PLASTICS_AND_RUBBER_MANUFACTURING",
                "POSTAL_EXPRESS_DELIVERY_AND_COURIERS",
                "PRECISION_INSTRUMENTS_AND_CONTROLS",
                "PRIVATE_SECURITY_FIRMS_AND_PRIVATE_MILITARY_CONTRACTORS",
                "PROLIFERATION_OF_WEAPONS_OF_MASS_DESTRUCTION",
                "PROPERTY_LEASING_AND_MANAGEMENT",
                "PROSTITUTION_MODEL_AGENCIES_ESCORT",
                "PROVIDERS_OF_PRIVATE_ONLINE_LOTTERY_MAIL_ORDER_LOTTERIES_AND_SWEEPSTAKES",
                "RADIO_AND_TELEVISION_BROADCASTING",
                "REAL_ESTATE_AGENTS_AND_APPRAISERS",
                "REAL_ESTATE_CONSTRUCTION_AND_DEVELOPERS",
                "RELIGIOUS_ORGANIZATIONS_AND_PLACES_OF_WORSHIP",
                "RENTAL_CARS",
                "RESIDENTIAL_AND_LONG_TERM_CARE_FACILITIES",
                "RESTAURANTS_AND_BARS",
                "SAUNA_HAMMAM_OR_BATH_HOUSES",
                "SCRAP_METAL",
                "SCUBA_DIVING_EQUIPMENT",
                "SECURITIES_AND_COMMODITY_EXCHANGES",
                "SECURITIES_AGENTS_AND_BROKERS",
                "SEMICONDUCTOR_AND_MICROCHIP_MANUFACTURING",
                "SEWAGE_TREATMENT_FACILITIES",
                "SHELL_BANKS",
                "SMOKING_CLUBS",
                "SOCIAL_AND_MEMBERSHIP_ORGANIZATIONS",
                "SOCIAL_MEDIA",
                "SOFTWARE_SERVICES",
                "SPORTS_GAMBLING",
                "SPORTS_ARTS_AND_RECREATION",
                "TATTOO_SHOPS",
                "TAXI_BUSES_AND_TRANSIT_SYSTEMS",
                "TECHNICAL_AND_TRADE_SCHOOLS",
                "TELECOMMUNICATIONS_EQUIPMENT_AND_ACCESSORIES",
                "TELEPHONE_SERVICE_PROVIDERS_AND_CARRIERS",
                "TEXTILES_APPAREL_AND_ACCESSORIES",
                "TOBACCO_VAPE_E_CIGARETTES_CONTROLLED_PRODUCTS",
                "TOOLS_AND_HARDWARE",
                "TRADE_GROUPS_AND_LABOR_UNIONS",
                "TRADING_FOR_RETAIL_CUSTOMERS",
                "TRAVEL_AGENTS_AND_SERVICES",
                "TRAVEL_TOURISM_RECREATIONS_AND_LEISURE",
                "TRUST_FIDUCIARY_AND_CUSTODIAN_ACTIVITIES",
                "UNAUTHORISED_TICKET_SELLERS",
                "UNLAWFUL_INTERNET_GAMBLING",
                "USED_AUTOMOBILE_DEALERS_AND_SELLERS_OF_USED_CAR_PARTS",
                "VETERINARY_CLINICS_AND_SERVICES",
                "VIDEO_AND_LIVE_STREAMING",
                "VIDEO_AND_TELECONFERENCING",
                "WAREHOUSING_AND_STORAGE",
                "WASTE_MANAGEMENT_AND_RECYCLING",
                "WATER_TREATMENT_AND_UTILITIES",
                "OTHER"
              ]
            },
            "uniqueItems": true
          },
          "legalType": {
            "type": "string",
            "description": "Legal business type.",
            "enum": [
              "LIMITED_LIABILITY_COMPANY",
              "SOLE_PROPRIETORSHIP",
              "GENERAL_PARTNERSHIP_COMPANY"
            ]
          },
          "incorporatedInUae": {
            "type": "boolean",
            "description": "Indicates if the business is incorporate in the UAE."
          },
          "hasBankAccount": {
            "type": "boolean",
            "description": "Indicates if the business has a bank account."
          },
          "yearsOfBusinessRange": {
            "type": "string",
            "description": "The number of years the business has been in operation.",
            "enum": [
              "LESS_THAN_ONE",
              "ONE_TO_TWO",
              "TWO_TO_FIVE",
              "FIVE_PLUS"
            ]
          },
          "numberOfEmployeesRange": {
            "type": "string",
            "description": "The number of employees the business has.",
            "enum": [
              "ONE_TO_TEN",
              "TEN_TO_THIRTY",
              "THIRTY_PLUS"
            ]
          },
          "annualRevenue": {
            "type": "integer",
            "format": "int32",
            "description": "The annual revenue (in USD) of the business."
          },
          "website": {
            "type": "string",
            "description": "The full website URL of the business."
          },
          "productOrServiceSold": {
            "type": "string",
            "description": "Description of the product or service the business sells."
          },
          "intendedSalesChannel": {
            "type": "string",
            "description": "The intended sales channel for the business.",
            "enum": [
              "ONLINE",
              "IN_PERSON",
              "BOTH"
            ]
          },
          "salesDistributionChannels": {
            "type": "array",
            "description": "The primary sales and distribution channels used by the business.",
            "items": {
              "type": "string",
              "enum": [
                "SOCIAL_MEDIA",
                "REFERRALS",
                "TRADE_SHOWS",
                "DIGITAL_ADVERTISING",
                "IN_PERSON_SALES_TEAM",
                "OTHER"
              ]
            },
            "uniqueItems": true
          },
          "investmentSourceOfFunds": {
            "$ref": "#/components/schemas/InvestmentSourceOfFunds",
            "description": "Details of source of funds for the business."
          },
          "incomingPaymentCountries": {
            "type": "array",
            "description": "The countries from which payments will be made into your account.",
            "items": {
              "type": "string"
            }
          },
          "incomingPaymentsMonthlyVolume": {
            "type": "integer",
            "format": "int32",
            "description": "The estimated volume (in USD) of incoming payments per month."
          },
          "incomingPaymentsMonthlyCount": {
            "type": "integer",
            "format": "int32",
            "description": "The estimated number of incoming payments per month."
          },
          "outgoingPaymentCountries": {
            "type": "array",
            "description": "The countries to which payments will be made from your account.",
            "items": {
              "type": "string"
            }
          },
          "outgoingPaymentsMonthlyVolume": {
            "type": "integer",
            "format": "int32",
            "description": "The estimated volume (in USD) of outgoing payments per month."
          },
          "outgoingPaymentsMonthlyCount": {
            "type": "integer",
            "format": "int32",
            "description": "The estimated number of outgoing payments per month."
          },
          "accountOpeningPurposes": {
            "type": "array",
            "description": "The purpose(s) for opening the account.",
            "items": {
              "type": "string",
              "enum": [
                "RECEIVE_FUNDS",
                "SEND_FUNDS",
                "UAE_PAYMENTS",
                "PLATFORM_INTEGRATION",
                "BULK_PAYMENTS",
                "CRYPTOCURRENCY_PAYMENTS",
                "OTHER"
              ]
            },
            "uniqueItems": true
          },
          "addressLine1": {
            "type": "string",
            "description": "First line of address."
          },
          "addressLine2": {
            "type": "string",
            "description": "Second line of address."
          },
          "areaOrCity": {
            "type": "string",
            "description": "Address town or city."
          },
          "provinceState": {
            "type": "string",
            "description": "Address province or state."
          },
          "postalCode": {
            "type": "string",
            "description": "Address postal code."
          }
        }
      },
      "SimulatePayoutResponse": {
        "type": "object",
        "description": "Payout state after the simulation, as the payment request payment now reports it",
        "properties": {
          "paymentRequestId": {
            "type": "string",
            "format": "uuid"
          },
          "paymentId": {
            "type": "string",
            "format": "uuid"
          },
          "payoutStatus": {
            "type": "string",
            "description": "Payout status after this step",
            "enum": [
              "PENDING_APPROVAL",
              "INITIATED",
              "PAID",
              "FAILED"
            ],
            "example": "PAID"
          },
          "outcome": {
            "type": "string",
            "enum": [
              "APPROVED",
              "REJECTED",
              "PAID",
              "FAILED"
            ]
          },
          "alreadyProcessed": {
            "type": "boolean",
            "description": "True when the payout had already reached the requested outcome; nothing changed"
          },
          "message": {
            "type": "string",
            "description": "Human-readable result naming the webhook queued"
          }
        }
      },
      "SimulatePayoutRequest": {
        "type": "object",
        "description": "Move a payment's payout one step through its lifecycle in sandbox",
        "properties": {
          "paymentRequestReference": {
            "type": "string",
            "description": "Payment request UUID, your externalId, or the paymentLinkReference. The JSON field paymentRequestId is also accepted.",
            "example": "ORDER-10045",
            "minLength": 1
          },
          "paymentId": {
            "type": "string",
            "format": "uuid",
            "description": "The completed payment whose payout to move: the id of the entry in the payment request's payments array, or the paymentId returned by a simulation.",
            "example": "e9df7b8b-2276-4941-9f87-c4b556c5382d"
          },
          "outcome": {
            "type": "string",
            "description": "APPROVED or REJECTED act on a payout in PENDING_APPROVAL. PAID or FAILED act on a payout in INITIATED, as the bank would report it.",
            "enum": [
              "APPROVED",
              "REJECTED",
              "PAID",
              "FAILED"
            ],
            "example": "PAID"
          },
          "failureReason": {
            "type": "string",
            "description": "Optional reason recorded for REJECTED or FAILED",
            "example": "Beneficiary account closed",
            "maxLength": 255,
            "minLength": 0
          }
        },
        "required": [
          "outcome",
          "paymentId",
          "paymentRequestReference"
        ]
      }
    },
    "headers": {
      "TraceId": {
        "description": "Trace ID to provide when contacting Hubpay support",
        "schema": {
          "type": "string",
          "example": "0af7651916cd43dd8448eb211c80319c"
        }
      }
    },
    "securitySchemes": {
      "Authorization": {
        "type": "http",
        "description": "JWT Bearer token for authenticating API requests",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "x-tagGroups": [
    {
      "name": "Authentication",
      "tags": [
        "Authentication"
      ]
    },
    {
      "name": "Onboarding",
      "tags": [
        "Account",
        "Business Profile",
        "Branding",
        "Persons",
        "Corporates",
        "Documents",
        "Users"
      ]
    },
    {
      "name": "Connections",
      "tags": [
        "Connections"
      ]
    },
    {
      "name": "RFI",
      "tags": [
        "RFI"
      ]
    },
    {
      "name": "Payments",
      "tags": [
        "Payments"
      ]
    },
    {
      "name": "Collections",
      "tags": [
        "Payment Requests",
        "Payers",
        "Receipts",
        "Rates"
      ]
    },
    {
      "name": "Sandbox simulations",
      "tags": [
        "Sandbox simulations"
      ]
    },
    {
      "name": "Beneficiaries",
      "tags": [
        "Beneficiaries"
      ]
    },
    {
      "name": "Exchange",
      "tags": [
        "Exchange"
      ]
    },
    {
      "name": "Wallets",
      "tags": [
        "Wallets"
      ]
    },
    {
      "name": "Transactions",
      "tags": [
        "Transactions"
      ]
    },
    {
      "name": "Funding accounts",
      "tags": [
        "Funding accounts"
      ]
    },
    {
      "name": "Webhook management",
      "tags": [
        "Webhook management"
      ]
    }
  ]
}
