{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/PayoutRecipient",
  "title": "PayoutRecipient",
  "type": "object",
  "required": [
    "name",
    "country"
  ],
  "properties": {
    "name": {
      "type": "string",
      "description": "The full name of the recipient."
    },
    "country": {
      "type": "string",
      "description": "The ISO 3166-1 alpha-2 country code of the recipient.",
      "enum": [
        "GB",
        "DE",
        "FR",
        "NL",
        "BE",
        "CA",
        "CD"
      ],
      "example": "GB"
    },
    "accountNumber": {
      "type": "string",
      "description": "The recipient bank account number or IBAN."
    },
    "sortCode": {
      "type": "string",
      "description": "The UK sort code, required for Faster Payments.",
      "pattern": "^\\d{6}$"
    },
    "iban": {
      "type": "string",
      "description": "The IBAN, required for SEPA transfers."
    },
    "bic": {
      "type": "string",
      "description": "The BIC/SWIFT code for the recipient bank."
    },
    "email": {
      "type": "string",
      "format": "email",
      "description": "The recipient email, required for Interac transfers."
    },
    "phoneNumber": {
      "type": "string",
      "description": "The recipient phone number, required for Mobile Money."
    }
  }
}