{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "title": "Payment Message Data Requirements",
    "description": "Dbtr object schema for an individual originator",
    "type": "object",
    "properties": {
        "Dbtr": {
            "type": "object",
            "description": "Party that owes an amount of money to the creditor.",
            "properties": {
                "CtctDtls": {
                    "type": "object",
                    "description": "Allows the contact information for the Debtor to be held.",
                    "required": [
                        "MobNb"
                    ],
                    "properties": {
                        "MobNb": {
                            "type": "string",
                            "description": "The originator's phone number including country code",
                            "minLength": 0,
                            "maxLength": 30
                        }
                    }
                },
                "StrdNm": {
                    "type": "object",
                    "description": "Allows the name of the Debtor to be held in a structured format.",
                    "required": [
                        "LastNm",
                        "FirstNm"
                    ],
                    "properties": {
                        "LastNm": {
                            "type": "string",
                            "description": "Last name by which the party is known and which is usually used to identify the party.\n\nRequirements:\n\n\u2022 Must include one (1) name string.\n\n\u2022 If the last name has two or more words, separate them with a space.\n\n\u2022 Provide a truncated name if longer than allowable characters.\n\n\u2022 Do not use this field to specify the individual's middle name. Example:\n\n\u2022 If the party's full name is 'Enrique Miguel Iglesias Preysler,' where 'Iglesias Preysler' is the last name, the `StrdNm.LastNm` value must be 'Iglesias Preysler'.",
                            "minLength": 0,
                            "maxLength": 50,
                            "pattern": "/^[a-zA-Z ]+$/"
                        },
                        "FirstNm": {
                            "type": "string",
                            "description": "First name by which the party is known and which is usually used to identify the party.\n\nRequirements:\n\n\u2022 Must include one (1) name string.\n\n\u2022 If the first name has two or more words, separate them with a space.\n\n\u2022 Do not use this field to specify the individual's middle name. Use `StrdNm.MidNm` instead.\n\n\u2022 Provide a truncated name if longer than allowable characters. Example: If the party's full name is 'Norma-Jean Baker' where 'Norma-Jean' is the first name, the `StrdNm.FirstNm` value must be 'Norma Jean'.",
                            "minLength": 0,
                            "maxLength": 50,
                            "pattern": "/^[a-zA-Z ]+$/"
                        }
                    }
                },
                "Id": {
                    "type": "object",
                    "description": "Unique and unambiguous way to identify the Debtor.",
                    "properties": {
                        "PrvtId": {
                            "type": "object",
                            "description": "Unique and unambiguous identification of a person, for example, passport.",
                            "required": [
                                "Ntlty"
                            ],
                            "properties": {
                                "Othr": {
                                    "type": "object",
                                    "description": "An object containing the unique identification of a party, as assigned by an institution, using an identification scheme.",
                                    "required": [
                                        "DtOfExpr",
                                        "Id"
                                    ],
                                    "properties": {
                                        "DtOfExpr": {
                                            "type": "string",
                                            "description": "The date of expiration of the supporting documentation.",
                                            "minLength": 0,
                                            "maxLength": 10,
                                            "pattern": "YYYY-MM-DD"
                                        },
                                        "Id": {
                                            "type": "string",
                                            "description": "The originator's ID document number",
                                            "minLength": 0,
                                            "maxLength": 35
                                        },
                                        "SchmeNm": {
                                            "type": "object",
                                            "required": [
                                                "Cd"
                                            ],
                                            "properties": {
                                                "Cd": {
                                                    "type": "string",
                                                    "description": "The originator ID document type",
                                                    "minLength": 0,
                                                    "maxLength": 35,
                                                    "enum": [
                                                        "ARNU",
                                                        "CUST",
                                                        "DRLC",
                                                        "EMPL",
                                                        "NIDN",
                                                        "CCPT",
                                                        "SOS",
                                                        "TXID"
                                                    ],
                                                    "x-enumDescriptions": {
                                                        "ARNU": "Alien Registration Number",
                                                        "CUST": "Customer Identification Number",
                                                        "DRLC": "Drivers License Number",
                                                        "EMPL": "Employee Identification Number",
                                                        "NIDN": "National Identity Number",
                                                        "CCPT": "Passport Number",
                                                        "SOS": "Social Security Number",
                                                        "TXID": "Tax Identification Number"
                                                    }
                                                }
                                            }
                                        }
                                    }
                                },
                                "Ntlty": {
                                    "type": "string",
                                    "description": "2-letter country code of nationality of the party.",
                                    "minLength": 0,
                                    "maxLength": 2
                                },
                                "DtAndPlcOfBirth": {
                                    "type": "object",
                                    "description": "Date and place of birth of a person.",
                                    "required": [
                                        "BirthDt"
                                    ],
                                    "properties": {
                                        "BirthDt": {
                                            "type": "string",
                                            "description": "The originator's date of birth in YYYY-MM-DD format",
                                            "minLength": 0,
                                            "maxLength": 10,
                                            "pattern": "YYYY-MM-DD"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "PstlAdr": {
                    "type": "object",
                    "description": "Allows the address of the Debtor to be held.",
                    "required": [
                        "AdrLine",
                        "PstCd",
                        "TwnNm",
                        "Ctry"
                    ],
                    "properties": {
                        "AdrLine": {
                            "type": "array",
                            "description": "Information that locates and identifies the street address for the party, as defined by postal services.",
                            "minLength": 0,
                            "maxLength": 50
                        },
                        "PstCd": {
                            "type": "string",
                            "description": "Information that locates and identifies the postal code for the party, as defined by postal services.",
                            "minLength": 0,
                            "maxLength": 30
                        },
                        "TwnNm": {
                            "type": "string",
                            "description": "Information that locates and identifies the party's city or town name, as defined by postal services.",
                            "minLength": 0,
                            "maxLength": 30
                        },
                        "Ctry": {
                            "type": "string",
                            "description": "Information that locates and identifies the country for the party, as defined by postal services. Use Alpha-2 Code as defined in the [ISO CountryCode ISO 3166-1](https://www.iso.org/obp/ui/#search) list.",
                            "minLength": 0,
                            "maxLength": 2
                        }
                    }
                }
            }
        }
    },
    "required": [
        "Dbtr"
    ]
}