<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2024 rel. 2 sp1 (x64) (https://www.altova.com) by Ministerio de Hacienda Costa Rica (PC Central) -->
<xs:schema xmlns="https://cdn.comprobanteselectronicos.go.cr/xml-schemas/v4.4/mensajeHacienda" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" targetNamespace="https://cdn.comprobanteselectronicos.go.cr/xml-schemas/v4.4/mensajeHacienda" elementFormDefault="qualified" attributeFormDefault="unqualified" version="4.4" vc:minVersion="1.1">
	<xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="../../xmldsig-core-schema.xsd"/>
	<xs:element name="MensajeHacienda">
		<xs:annotation>
			<xs:documentation>Mensaje de uso exclusivo por parte de la Direccion General de Tributación</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:sequence>
				<xs:element name="Clave">
					<xs:annotation>
						<xs:documentation>Clave numérica del comprobante</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:pattern value="\d{50,50}"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="NombreEmisor">
					<xs:annotation>
						<xs:documentation>Nombre o razón social del emisor</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:maxLength value="100"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="TipoIdentificacionEmisor" nillable="false">
					<xs:annotation>
						<xs:documentation>Tipo de identificacion: 01 Cedula Fisica, 02 Cedula Juridica, 03 DIMEX, 04 NITE, 05 Extranjero No Domiciliado, 06 No Contribuyente</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:enumeration value="01">
								<xs:annotation>
									<xs:documentation>Cedula Fisica</xs:documentation>
								</xs:annotation>
							</xs:enumeration>
							<xs:enumeration value="02">
								<xs:annotation>
									<xs:documentation> Cedula Juridica</xs:documentation>
								</xs:annotation>
							</xs:enumeration>
							<xs:enumeration value="03">
								<xs:annotation>
									<xs:documentation>DIMEX</xs:documentation>
								</xs:annotation>
							</xs:enumeration>
							<xs:enumeration value="04">
								<xs:annotation>
									<xs:documentation>NITE</xs:documentation>
								</xs:annotation>
							</xs:enumeration>
							<xs:enumeration value="05">
								<xs:annotation>
									<xs:documentation>Extranjero No Domiciliado</xs:documentation>
								</xs:annotation>
							</xs:enumeration>
							<xs:enumeration value="06">
								<xs:annotation>
									<xs:documentation>No Contribuyente</xs:documentation>
								</xs:annotation>
							</xs:enumeration>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="NumeroCedulaEmisor">
					<xs:annotation>
						<xs:documentation>Número de cédula fisica/jurídica/NITE/DIMEX/Extranjero No Domiciliado/No Contribuyente del emisor</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:maxLength value="20"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="NombreReceptor" nillable="false" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Nombre o razon social del receptor</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:maxLength value="100"/>
							<xs:minLength value="0"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="TipoIdentificacionReceptor" nillable="true" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Tipo de identificacion: 01 Cedula Fisica, 02 Cedula Juridica, 03 DIMEX, 04 NITE, 05 Extranjero No Domiciliado, 06 No Contribuyente</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:enumeration value="01">
								<xs:annotation>
									<xs:documentation>Cedula Fisica</xs:documentation>
								</xs:annotation>
							</xs:enumeration>
							<xs:enumeration value="02">
								<xs:annotation>
									<xs:documentation> Cedula Juridica</xs:documentation>
								</xs:annotation>
							</xs:enumeration>
							<xs:enumeration value="03">
								<xs:annotation>
									<xs:documentation>DIMEX</xs:documentation>
								</xs:annotation>
							</xs:enumeration>
							<xs:enumeration value="04">
								<xs:annotation>
									<xs:documentation>NITE</xs:documentation>
								</xs:annotation>
							</xs:enumeration>
							<xs:enumeration value="05">
								<xs:annotation>
									<xs:documentation>Extranjero No Domiciliado</xs:documentation>
								</xs:annotation>
							</xs:enumeration>
							<xs:enumeration value="06">
								<xs:annotation>
									<xs:documentation>No Contribuyente</xs:documentation>
								</xs:annotation>
							</xs:enumeration>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="NumeroCedulaReceptor" nillable="true" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Número de cédula fisica/jurídica/NITE/DIMEX/Extranjero No Domiciliado/No Contribuyente del receptor</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:maxLength value="20"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="Mensaje">
					<xs:annotation>
						<xs:documentation>Codigo del mensaje de respuesta. 1 aceptado, 3 rechazado</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:integer">
							<xs:enumeration value="1">
								<xs:annotation>
									<xs:documentation>Aceptado</xs:documentation>
								</xs:annotation>
							</xs:enumeration>
							<xs:enumeration value="3">
								<xs:annotation>
									<xs:documentation>Rechazado</xs:documentation>
								</xs:annotation>
							</xs:enumeration>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="EstadoMensaje">
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:maxLength value="9"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="DetalleMensaje">
					<xs:annotation>
						<xs:documentation>Detalle del mensaje</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:string"/>
					</xs:simpleType>
				</xs:element>
				<xs:element name="MontoTotalImpuesto" minOccurs="0">
					<xs:annotation>
						<xs:documentation>Monto total del impuesto, que es obligatorio si el comprobante tenga impuesto.</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:decimal">
							<xs:totalDigits value="18"/>
							<xs:fractionDigits value="5"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element name="TotalFactura">
					<xs:annotation>
						<xs:documentation>Monto total de la factura</xs:documentation>
					</xs:annotation>
					<xs:simpleType>
						<xs:restriction base="xs:decimal">
							<xs:totalDigits value="18"/>
							<xs:fractionDigits value="5"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:element>
				<xs:element ref="ds:Signature" minOccurs="1" maxOccurs="1"/>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
</xs:schema>