{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/token-io/main/json-schema/token-io-io-token-proto-gateway-create-sub-tpp-request-schema.json",
  "title": "io.token.proto.gateway.CreateSubTppRequest",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/token-io-subtpp-api-openapi.yml#/components/schemas/io.token.proto.gateway.CreateSubTppRequest",
  "type": "object",
  "properties": {
    "domain": {
      "type": "string"
    },
    "domicileCountry": {
      "type": "string"
    },
    "logo": {
      "format": "byte",
      "type": "string"
    },
    "mccCode": {
      "type": "string"
    },
    "merchant": {
      "$ref": "#/$defs/io.token.proto.common.member.Merchant"
    },
    "name": {
      "type": "string"
    },
    "parentSubTppId": {
      "type": "string"
    },
    "useNewFlow": {
      "format": "boolean",
      "type": "boolean"
    }
  },
  "$defs": {
    "io.token.proto.common.member.Merchant": {
      "type": "object",
      "properties": {
        "accountNumber": {
          "type": "string"
        },
        "approvalDate": {
          "type": "string"
        },
        "bic": {
          "type": "string"
        },
        "chargeableStatus": {
          "$ref": "#/$defs/io.token.proto.common.member.Merchant.ChargeableStatus"
        },
        "companyRegistrationNumber": {
          "type": "string"
        },
        "competentAuthorities": {
          "items": {
            "$ref": "#/$defs/io.token.proto.common.member.Merchant.CompetentAuthorities"
          },
          "type": "array"
        },
        "directors": {
          "items": {
            "$ref": "#/$defs/io.token.proto.common.member.Merchant.PersonDetail"
          },
          "type": "array"
        },
        "hasVirtualAccount": {
          "format": "boolean",
          "type": "boolean"
        },
        "iban": {
          "type": "string"
        },
        "industry": {
          "type": "string"
        },
        "legalEntityName": {
          "type": "string"
        },
        "mccSubType": {
          "type": "string"
        },
        "merchantJurisdiction": {
          "type": "string"
        },
        "merchantType": {
          "$ref": "#/$defs/io.token.proto.common.member.Merchant.MerchantType"
        },
        "primaryUseCase": {
          "type": "string"
        },
        "regulatoryType": {
          "$ref": "#/$defs/io.token.proto.common.member.Merchant.RegulatoryType"
        },
        "reportingIdentifier": {
          "type": "string"
        },
        "reportingLabel": {
          "type": "string"
        },
        "riskAssessmentReviewDate": {
          "type": "string"
        },
        "riskAssessmentScore": {
          "$ref": "#/$defs/io.token.proto.common.member.Merchant.RiskAssessmentScore"
        },
        "signatories": {
          "items": {
            "$ref": "#/$defs/io.token.proto.common.member.Merchant.PersonDetail"
          },
          "type": "array"
        },
        "soleTrader": {
          "$ref": "#/$defs/io.token.proto.common.member.Merchant.PersonDetail"
        },
        "sortCode": {
          "type": "string"
        },
        "subTppId": {
          "type": "string"
        },
        "terminationDate": {
          "type": "string"
        },
        "ubos": {
          "items": {
            "$ref": "#/$defs/io.token.proto.common.member.Merchant.PersonDetail"
          },
          "type": "array"
        },
        "uid": {
          "type": "string"
        }
      }
    },
    "io.token.proto.common.member.Merchant.ChargeableStatus": {
      "enum": [
        "INVALID_STATUS",
        "CHARGEABLE",
        "PASS_THROUGH",
        "INTERNAL"
      ],
      "default": "INVALID_STATUS",
      "type": "string"
    },
    "io.token.proto.common.member.Merchant.CompetentAuthorities": {
      "enum": [
        "INVALID_AUTHORITY",
        "FCA",
        "BAFIN"
      ],
      "default": "INVALID_AUTHORITY",
      "type": "string"
    },
    "io.token.proto.common.member.Merchant.MerchantType": {
      "enum": [
        "INVALID_MERCHANT_TYPE",
        "TOKEN_LICENSED_SOLE_TRADER",
        "TOKEN_LICENSED_NON_SOLE_TRADER_PUBLIC",
        "TOKEN_LICENSED_NON_SOLE_TRADER_PRIVATE",
        "LICENSED_TPP_SOLE_TRADER",
        "LICENSED_TPP_NON_SOLE_TRADER"
      ],
      "default": "INVALID_MERCHANT_TYPE",
      "type": "string"
    },
    "io.token.proto.common.member.Merchant.PersonDetail": {
      "type": "object",
      "properties": {
        "address": {
          "type": "string"
        },
        "dateOfBirth": {
          "type": "string"
        },
        "fullName": {
          "type": "string"
        }
      }
    },
    "io.token.proto.common.member.Merchant.RegulatoryType": {
      "enum": [
        "INVALID_TYPE",
        "TYPE_1",
        "TYPE_2"
      ],
      "default": "INVALID_TYPE",
      "type": "string"
    },
    "io.token.proto.common.member.Merchant.RiskAssessmentScore": {
      "enum": [
        "INVALID_SCORE",
        "GREEN",
        "AMBER",
        "RED"
      ],
      "default": "INVALID_SCORE",
      "type": "string"
    }
  }
}