<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns="http://www.esocial.gov.br/schema/evt/evtPgtos/v_S_01_01_00" targetNamespace="http://www.esocial.gov.br/schema/evt/evtPgtos/v_S_01_01_00" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:include schemaLocation="tipos.xsd" />
    <xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd" />
    <xs:element name="eSocial">
        <xs:annotation>
            <xs:documentation>S-1210 - Pagamentos de Rendimentos do Trabalho</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element name="evtPgtos">
                    <xs:annotation>
                        <xs:documentation>Evento Pagamentos de Rendimentos do Trabalho.</xs:documentation>
                        <xs:documentation>CHAVE_GRUPO: {Id}</xs:documentation>
                        <xs:documentation>REGRA:REGRA_CONTROLE_DUPLICIDADE</xs:documentation>
                        <xs:documentation>REGRA:REGRA_EMPREGADO_DOMESTICO</xs:documentation>
                        <xs:documentation>REGRA:REGRA_ENVIO_PROC_FECHAMENTO</xs:documentation>
                        <xs:documentation>REGRA:REGRA_EVENTOS_EXTEMP</xs:documentation>
                        <xs:documentation>REGRA:REGRA_EVE_FOPAG_SIMPLIFICADO</xs:documentation>
                        <xs:documentation>REGRA:REGRA_EXISTE_INFO_EMPREGADOR</xs:documentation>
                        <xs:documentation>REGRA:REGRA_MESMO_PROCEMI</xs:documentation>
                        <xs:documentation>REGRA:REGRA_PAGTO_IND_RETIFICACAO</xs:documentation>
                        <xs:documentation>REGRA:REGRA_PAGTO_PERMITE_EXCLUSAO</xs:documentation>
                        <xs:documentation>REGRA:REGRA_VALIDA_DT_PGTO</xs:documentation>
                        <xs:documentation>REGRA:REGRA_VALIDA_EMPREGADOR</xs:documentation>
                        <xs:documentation>REGRA:REGRA_VALIDA_PER_APUR_PGTO</xs:documentation>
                    </xs:annotation>
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="ideEvento" type="T_ideEvento_folha_mensal" />
                            <xs:element name="ideEmpregador" type="T_ideEmpregador" />
                            <xs:element name="ideBenef">
                                <xs:annotation>
                                    <xs:documentation>Identificação do beneficiário do pagamento.</xs:documentation>
                                    <xs:documentation>CHAVE_GRUPO: {cpfBenef*}</xs:documentation>
                                </xs:annotation>
                                <xs:complexType>
                                    <xs:sequence>
                                        <xs:element name="cpfBenef" type="TS_cpf">
                                            <xs:annotation>
                                                <xs:documentation>Informar o CPF do beneficiário.</xs:documentation>
                                                <xs:documentation>Validação: Deve ser o mesmo CPF informado no evento de remuneração ou desligamento (S-1200, S-1202, S-1207, S-2299 ou S-2399).</xs:documentation>
                                            </xs:annotation>
                                        </xs:element>
                                        <xs:element name="infoPgto" maxOccurs="999">
                                            <xs:annotation>
                                                <xs:documentation>Informações dos pagamentos efetuados.</xs:documentation>
                                                <xs:documentation>CHAVE_GRUPO: {tpPgto}, {perRef}, {ideDmDev}</xs:documentation>
                                            </xs:annotation>
                                            <xs:complexType>
                                                <xs:sequence>
                                                    <xs:element name="dtPgto" type="xs:date">
                                                        <xs:annotation>
                                                            <xs:documentation>Informar a data de pagamento.</xs:documentation>
                                                            <xs:documentation>Validação: A data informada deve estar compreendida no período de apuração ({perApur}(1210_ideEvento_perApur)), exceto se {procEmi}(1210_ideEvento_procEmi) = [2, 4, 22].</xs:documentation>
                                                        </xs:annotation>
                                                    </xs:element>
                                                    <xs:element name="tpPgto">
                                                        <xs:simpleType>
                                                            <xs:annotation>
                                                                <xs:documentation>Informar o evento de origem do pagamento.</xs:documentation>
                                                            </xs:annotation>
                                                            <xs:restriction base="xs:byte">
                                                                <xs:enumeration value="1">
                                                                    <xs:annotation>
                                                                        <xs:documentation>Pagamento de remuneração, conforme apurado em {ideDmDev}(1200_dmDev_ideDmDev) do S-1200</xs:documentation>
                                                                    </xs:annotation>
                                                                </xs:enumeration>
                                                                <xs:enumeration value="2">
                                                                    <xs:annotation>
                                                                        <xs:documentation>Pagamento de verbas rescisórias conforme apurado em {ideDmDev}(2299_infoDeslig_verbasResc_dmDev_ideDmDev) do S-2299</xs:documentation>
                                                                    </xs:annotation>
                                                                </xs:enumeration>
                                                                <xs:enumeration value="3">
                                                                    <xs:annotation>
                                                                        <xs:documentation>Pagamento de verbas rescisórias conforme apurado em {ideDmDev}(2399_infoTSVTermino_verbasResc_dmDev_ideDmDev) do S-2399</xs:documentation>
                                                                    </xs:annotation>
                                                                </xs:enumeration>
                                                                <xs:enumeration value="4">
                                                                    <xs:annotation>
                                                                        <xs:documentation>Pagamento de remuneração conforme apurado em {ideDmDev}(1202_dmDev_ideDmDev) do S-1202</xs:documentation>
                                                                    </xs:annotation>
                                                                </xs:enumeration>
                                                                <xs:enumeration value="5">
                                                                    <xs:annotation>
                                                                        <xs:documentation>Pagamento de benefícios previdenciários, conforme apurado em {ideDmDev}(1207_dmDev_ideDmDev) do S-1207</xs:documentation>
                                                                    </xs:annotation>
                                                                </xs:enumeration>
                                                            </xs:restriction>
                                                        </xs:simpleType>
                                                    </xs:element>
                                                    <xs:element name="perRef" type="TS_perApur">
                                                        <xs:annotation>
                                                            <xs:documentation>Informar a competência declarada no campo {perApur} do evento remuneratório a que se refere o pagamento, no formato AAAA-MM (ou AAAA, se for relativa à folha de 13° salário). Se {tpPgto}(1210_ideBenef_infoPgto_tpPgto) = [2, 3], informar o mês/ano da data de desligamento (ou de término), no formato AAAA-MM.</xs:documentation>
                                                            <xs:documentation>Validação: Deve corresponder ao conteúdo indicado na relação a seguir:</xs:documentation>
                                                            <xs:documentation>Se {tpPgto}(1210_ideBenef_infoPgto_tpPgto) = [1], {perApur}(1200_ideEvento_perApur) do S-1200;</xs:documentation>
                                                            <xs:documentation>Se {tpPgto}(1210_ideBenef_infoPgto_tpPgto) = [2], mês/ano de {dtDeslig}(2299_infoDeslig_dtDeslig) do S-2299 (formato AAAA-MM);</xs:documentation>
                                                            <xs:documentation>Se {tpPgto}(1210_ideBenef_infoPgto_tpPgto) = [3], mês/ano de {dtTerm}(2399_infoTSVTermino_dtTerm) do S-2399 (formato AAAA-MM);</xs:documentation>
                                                            <xs:documentation>Se {tpPgto}(1210_ideBenef_infoPgto_tpPgto) = [4], {perApur}(1202_ideEvento_perApur) do S-1202;</xs:documentation>
                                                            <xs:documentation>Se {tpPgto}(1210_ideBenef_infoPgto_tpPgto) = [5], {perApur}(1207_ideEvento_perApur) do S-1207.</xs:documentation>
                                                        </xs:annotation>
                                                    </xs:element>
                                                    <xs:element name="ideDmDev" type="TS_codigo_esocial">
                                                        <xs:annotation>
                                                            <xs:documentation>Identificador atribuído pela fonte pagadora para o demonstrativo de valores devidos ao trabalhador conforme definido em S-1200, S-1202, S-1207, S-2299 ou S-2399.</xs:documentation>
                                                            <xs:documentation>Validação: Deve ser um valor atribuído pela fonte pagadora em S-1200, S-1202, S-1207, S-2299 ou S-2399 no campo {ideDmDev}, obedecendo à relação:</xs:documentation>
                                                            <xs:documentation>Se {tpPgto}(1210_ideBenef_infoPgto_tpPgto) = [1], em S-1200;</xs:documentation>
                                                            <xs:documentation>Se {tpPgto}(1210_ideBenef_infoPgto_tpPgto) = [2], em S-2299;</xs:documentation>
                                                            <xs:documentation>Se {tpPgto}(1210_ideBenef_infoPgto_tpPgto) = [3], em S-2399;</xs:documentation>
                                                            <xs:documentation>Se {tpPgto}(1210_ideBenef_infoPgto_tpPgto) = [4], em S-1202;</xs:documentation>
                                                            <xs:documentation>Se {tpPgto}(1210_ideBenef_infoPgto_tpPgto) = [5], em S-1207.</xs:documentation>
                                                        </xs:annotation>
                                                    </xs:element>
                                                    <xs:element name="vrLiq" type="TS_valorMonetario">
                                                        <xs:annotation>
                                                            <xs:documentation>Valor líquido recebido pelo trabalhador, composto pelos vencimentos e descontos, inclusive os descontos de IRRF e de pensão alimentícia (se houver).</xs:documentation>
                                                            <xs:documentation>Validação: Não pode ser um valor negativo.</xs:documentation>
                                                        </xs:annotation>
                                                    </xs:element>
                                                    <xs:element name="paisResidExt" minOccurs="0" type="TS_pais">
                                                        <xs:annotation>
                                                            <xs:documentation>Informar o código do país de residência para fins fiscais, quando no exterior, conforme Tabela 06.</xs:documentation>
                                                            <xs:documentation>Somente informar este campo caso o país de residência para fins fiscais seja diferente de Brasil. Se não informado, implica que o país de residência fiscal é Brasil.</xs:documentation>
                                                            <xs:documentation>Validação: O campo apenas pode ser preenchido se {perApur}(1210_ideEvento_perApur) >= [2023-03]. Se informado, deve ser um código válido e existente na Tabela 06, exceto [105].</xs:documentation>
                                                        </xs:annotation>
                                                    </xs:element>
                                                    <xs:element name="infoPgtoExt" minOccurs="0">
                                                        <xs:annotation>
                                                            <xs:documentation>Informações complementares relativas a pagamentos a residente fiscal no exterior.</xs:documentation>
                                                            <xs:documentation>CONDICAO_GRUPO: O (se {paisResidExt}(../paisResidExt) for informado); N (nos demais casos)</xs:documentation>
                                                        </xs:annotation>
                                                        <xs:complexType>
                                                            <xs:sequence>
                                                                <xs:element name="indNIF">
                                                                    <xs:simpleType>
                                                                        <xs:annotation>
                                                                            <xs:documentation>Indicativo do Número de Identificação Fiscal (NIF).</xs:documentation>
                                                                        </xs:annotation>
                                                                        <xs:restriction base="xs:byte">
                                                                            <xs:enumeration value="1">
                                                                                <xs:annotation>
                                                                                    <xs:documentation>Beneficiário com NIF</xs:documentation>
                                                                                </xs:annotation>
                                                                            </xs:enumeration>
                                                                            <xs:enumeration value="2">
                                                                                <xs:annotation>
                                                                                    <xs:documentation>Beneficiário dispensado do NIF</xs:documentation>
                                                                                </xs:annotation>
                                                                            </xs:enumeration>
                                                                            <xs:enumeration value="3">
                                                                                <xs:annotation>
                                                                                    <xs:documentation>País não exige NIF</xs:documentation>
                                                                                </xs:annotation>
                                                                            </xs:enumeration>
                                                                        </xs:restriction>
                                                                    </xs:simpleType>
                                                                </xs:element>
                                                                <xs:element name="nifBenef" minOccurs="0" type="TS_codigo_esocial">
                                                                    <xs:annotation>
                                                                        <xs:documentation>Número de Identificação Fiscal (NIF).</xs:documentation>
                                                                        <xs:documentation>Validação: Preenchimento obrigatório se {indNIF}(./indNIF) = [1].</xs:documentation>
                                                                    </xs:annotation>
                                                                </xs:element>
                                                                <xs:element name="frmTribut">
                                                                    <xs:simpleType>
                                                                        <xs:annotation>
                                                                            <xs:documentation>Forma de tributação, conforme opções disponíveis na Tabela 30.</xs:documentation>
                                                                            <xs:documentation>Validação: Deve ser um código válido e existente na Tabela 30.</xs:documentation>
                                                                        </xs:annotation>
                                                                        <xs:restriction base="xs:string">
                                                                            <xs:pattern value="\d{2}" />
                                                                        </xs:restriction>
                                                                    </xs:simpleType>
                                                                </xs:element>
                                                                <xs:element name="endExt" minOccurs="0">
                                                                    <xs:annotation>
                                                                        <xs:documentation>Endereço do beneficiário residente ou domiciliado no exterior.</xs:documentation>
                                                                        <xs:documentation>CONDICAO_GRUPO: OC</xs:documentation>
                                                                        <xs:documentation>REGRA:REGRA_ENDERECO_EXTERIOR</xs:documentation>
                                                                    </xs:annotation>
                                                                    <xs:complexType>
                                                                        <xs:sequence>
                                                                            <xs:element name="endDscLograd" minOccurs="0">
                                                                                <xs:simpleType>
                                                                                    <xs:annotation>
                                                                                        <xs:documentation>Descrição do logradouro.</xs:documentation>
                                                                                    </xs:annotation>
                                                                                    <xs:restriction base="xs:string">
                                                                                        <xs:minLength value="1" />
                                                                                        <xs:maxLength value="80" />
                                                                                        <xs:pattern value="[^\s]{1}[\S\s]*" />
                                                                                    </xs:restriction>
                                                                                </xs:simpleType>
                                                                            </xs:element>
                                                                            <xs:element name="endNrLograd" minOccurs="0" type="TS_nrLograd">
                                                                                <xs:annotation>
                                                                                    <xs:documentation>Número do logradouro.</xs:documentation>
                                                                                    <xs:documentation>Validação: Devem ser utilizados apenas caracteres alfanuméricos com, pelo menos, um caractere numérico.</xs:documentation>
                                                                                </xs:annotation>
                                                                            </xs:element>
                                                                            <xs:element name="endComplem" minOccurs="0" type="TS_complemento" />
                                                                            <xs:element name="endBairro" minOccurs="0">
                                                                                <xs:simpleType>
                                                                                    <xs:annotation>
                                                                                        <xs:documentation>Nome do bairro/distrito.</xs:documentation>
                                                                                    </xs:annotation>
                                                                                    <xs:restriction base="xs:string">
                                                                                        <xs:minLength value="1" />
                                                                                        <xs:maxLength value="60" />
                                                                                        <xs:pattern value=".*[^\s].*" />
                                                                                    </xs:restriction>
                                                                                </xs:simpleType>
                                                                            </xs:element>
                                                                            <xs:element name="endCidade" minOccurs="0">
                                                                                <xs:simpleType>
                                                                                    <xs:annotation>
                                                                                        <xs:documentation>Nome da cidade.</xs:documentation>
                                                                                    </xs:annotation>
                                                                                    <xs:restriction base="xs:string">
                                                                                        <xs:minLength value="1" />
                                                                                        <xs:maxLength value="40" />
                                                                                        <xs:pattern value=".*[^\s].*" />
                                                                                    </xs:restriction>
                                                                                </xs:simpleType>
                                                                            </xs:element>
                                                                            <xs:element name="endEstado" minOccurs="0">
                                                                                <xs:simpleType>
                                                                                    <xs:annotation>
                                                                                        <xs:documentation>Nome da província/estado.</xs:documentation>
                                                                                    </xs:annotation>
                                                                                    <xs:restriction base="xs:string">
                                                                                        <xs:minLength value="1" />
                                                                                        <xs:maxLength value="40" />
                                                                                        <xs:pattern value=".*[^\s].*" />
                                                                                    </xs:restriction>
                                                                                </xs:simpleType>
                                                                            </xs:element>
                                                                            <xs:element name="endCodPostal" minOccurs="0">
                                                                                <xs:simpleType>
                                                                                    <xs:annotation>
                                                                                        <xs:documentation>Código de Endereçamento Postal.</xs:documentation>
                                                                                        <xs:documentation>Validação: Devem ser informados apenas caracteres numéricos.</xs:documentation>
                                                                                    </xs:annotation>
                                                                                    <xs:restriction base="xs:string">
                                                                                        <xs:pattern value="\d{1,12}" />
                                                                                    </xs:restriction>
                                                                                </xs:simpleType>
                                                                            </xs:element>
                                                                            <xs:element name="telef" minOccurs="0">
                                                                                <xs:simpleType>
                                                                                    <xs:annotation>
                                                                                        <xs:documentation>Número do telefone.</xs:documentation>
                                                                                        <xs:documentation>Validação: Devem ser informados apenas caracteres numéricos.</xs:documentation>
                                                                                    </xs:annotation>
                                                                                    <xs:restriction base="xs:string">
                                                                                        <xs:pattern value="\d{8,15}" />
                                                                                    </xs:restriction>
                                                                                </xs:simpleType>
                                                                            </xs:element>
                                                                        </xs:sequence>
                                                                    </xs:complexType>
                                                                </xs:element>
                                                            </xs:sequence>
                                                        </xs:complexType>
                                                    </xs:element>
                                                </xs:sequence>
                                            </xs:complexType>
                                        </xs:element>
                                    </xs:sequence>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                        <xs:attribute name="Id" use="required" type="TS_Id" />
                    </xs:complexType>
                </xs:element>
                <xs:element ref="ds:Signature" />
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>