{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lemonway/json-schema/lemonway-register-ibanextended-input-schema.json",
  "title": "RegisterIBANExtendedInput",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lemonway-moneyouts-api-openapi.yml#/components/schemas/RegisterIBANExtendedInput",
  "required": [
    "wallet",
    "holderName",
    "accountNumber",
    "bankCountry"
  ],
  "type": "object",
  "properties": {
    "wallet": {
      "description": "Payment Account ID",
      "maxLength": 256,
      "minLength": 0,
      "type": "string"
    },
    "accountType": {
      "format": "int32",
      "description": "Account Type, by default Other<br/>0 = Other.<br/>1 = IBAN.<br/>2 = BBAN/RIB.<br/>",
      "enum": [
        0,
        1,
        2
      ],
      "type": "integer"
    },
    "holderName": {
      "description": "The registered bank account owner: First and Last name, or Company Name",
      "maxLength": 256,
      "minLength": 0,
      "type": "string"
    },
    "accountNumber": {
      "description": "Account Number. The format depends on the account type.",
      "maxLength": 34,
      "minLength": 0,
      "type": "string"
    },
    "holderCountry": {
      "description": "Country of the beneficiary. Two-letter country code (ISO alpha-2) for example, France=<b>FR</b>",
      "maxLength": 2,
      "minLength": 2,
      "type": "string"
    },
    "bicCode": {
      "description": "BIC/SWIFT codes are arranged like this: AAAABBCCDDD\nAAAA: 4 character for bank code\nBB: 2 char for country code\nCC: 2 char for location code\nDDD: 3 char for branch code",
      "maxLength": 11,
      "minLength": 8,
      "type": "string"
    },
    "bankName": {
      "description": "Bank Name. This field is mandatory in the following circumstances:\n<ul><li>If the currency is USD</li><li>If the selected bank country code requires this field</li></ul>",
      "maxLength": 140,
      "minLength": 0,
      "type": "string"
    },
    "bankCountry": {
      "description": "Country of the Bank. Two-letter country code (ISO alpha-2) for example, France=<b>FR</b>",
      "maxLength": 2,
      "minLength": 2,
      "type": "string"
    },
    "bankBranchCode": {
      "description": "Bank Branch Code (Sort Code in the United Kingdom). It is mandatory for the examples below:\n<ul><li>If the selected bank country code requires this field.</li></ul>",
      "maxLength": 255,
      "minLength": 0,
      "type": "string"
    },
    "bankBranchAddress": {
      "$ref": "#/$defs/BankBranchAddress"
    },
    "intermediaryBicCode": {
      "description": "BIC/SWIFT Code of the Intermediary Bank.",
      "maxLength": 11,
      "minLength": 0,
      "type": "string"
    },
    "intermediaryBankName": {
      "description": "Intermediary Bank Name",
      "maxLength": 140,
      "minLength": 0,
      "type": "string"
    },
    "intermediaryBankCountry": {
      "description": "Bank Country Code of the Intermediary Bank. Two-letter country code (ISO alpha-2) for example, France=<b>FR</b>",
      "maxLength": 2,
      "minLength": 2,
      "type": "string"
    },
    "comment": {
      "description": "Reason for new Bank Account details if another one is already linked to the Payment Account.",
      "maxLength": 512,
      "minLength": 1,
      "type": "string"
    }
  },
  "$defs": {
    "BankBranchAddress": {
      "required": [
        "Street",
        "ZipCode",
        "City"
      ],
      "type": "object",
      "properties": {
        "Street": {
          "description": "Number and Street",
          "maxLength": 128,
          "minLength": 0,
          "type": "string"
        },
        "ZipCode": {
          "description": "Postal or Zip Code",
          "maxLength": 16,
          "minLength": 0,
          "type": "string"
        },
        "City": {
          "description": "City",
          "maxLength": 128,
          "minLength": 0,
          "type": "string"
        }
      }
    }
  }
}