Has AccountingCustomerParty become mandatory even with simplified invoices and their credit/debit notes

Customers use our kiosk devices to make purchases. In B2C orders, we don’t register detailed information for every customer. However, I encounter an error when submitting a simplified invoice without including <cac:AccountingCustomerParty>.

<?xml version="1.0" encoding="UTF-8"?>
<Invoice
	xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
	xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
	xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"
	xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2">
	
	<cbc:ProfileID>reporting:1.0</cbc:ProfileID>
	<cbc:ID>tst-gl-41</cbc:ID>
	<cbc:UUID>5ce16211-3775-4dfb-968f-f0c9e8f4a029</cbc:UUID>
	<cbc:IssueDate>2024-12-09</cbc:IssueDate>
	<cbc:IssueTime>03:12:38</cbc:IssueTime>
	<cbc:InvoiceTypeCode name="0200000">388</cbc:InvoiceTypeCode>
	<cbc:DocumentCurrencyCode>SAR</cbc:DocumentCurrencyCode>
	<cbc:TaxCurrencyCode>SAR</cbc:TaxCurrencyCode>
	<cac:AdditionalDocumentReference>
		<cbc:ID>ICV</cbc:ID>
		<cbc:UUID>1</cbc:UUID>
	</cac:AdditionalDocumentReference>
	<cac:AdditionalDocumentReference>
		<cbc:ID>PIH</cbc:ID>
		<cac:Attachment>
			<cbc:EmbeddedDocumentBinaryObject
				mimeCode="text/plain">3Nqabn1atF0XODKYB/RaaOzigb6aPdyJ2XbeNgqHgBU=
			</cbc:EmbeddedDocumentBinaryObject>
		</cac:Attachment>
	</cac:AdditionalDocumentReference>
	<cac:Signature>
		<cbc:ID>urn:oasis:names:specification:ubl:signature:Invoice</cbc:ID>
		<cbc:SignatureMethod>urn:oasis:names:specification:ubl:dsig:enveloped:xades
		</cbc:SignatureMethod>
	</cac:Signature>
	<cac:AccountingSupplierParty>
		<cac:Party>
			<cac:PartyIdentification>
				<cbc:ID schemeID="CRN">5000000007</cbc:ID>
			</cac:PartyIdentification>
			<cac:PostalAddress>
				<cbc:StreetName>236 str xx ww</cbc:StreetName>
				<cbc:BuildingNumber>1222</cbc:BuildingNumber>
				<cbc:CitySubdivisionName>Hegaaz</cbc:CitySubdivisionName>
				<cbc:CityName>Riyadh</cbc:CityName>
				<cbc:PostalZone>25800</cbc:PostalZone>
				<cac:Country>
					<cbc:IdentificationCode>SA</cbc:IdentificationCode>
				</cac:Country>
			</cac:PostalAddress>
			<cac:PartyTaxScheme>
				<cbc:CompanyID>345555555550003</cbc:CompanyID>
				<cac:TaxScheme>
					<cbc:ID>VAT</cbc:ID>
				</cac:TaxScheme>
			</cac:PartyTaxScheme>
			<cac:PartyLegalEntity>
				<cbc:RegistrationName>KartNgo</cbc:RegistrationName>
			</cac:PartyLegalEntity>
		</cac:Party>
	</cac:AccountingSupplierParty>
	<cac:PaymentMeans>
		<cbc:PaymentMeansCode>10</cbc:PaymentMeansCode>
		<cbc:InstructionNote>Payment using CASH</cbc:InstructionNote>
	</cac:PaymentMeans>
	<cac:TaxTotal>
		<cbc:TaxAmount currencyID="SAR">1.8</cbc:TaxAmount>
	</cac:TaxTotal>
	<cac:TaxTotal>
		<cbc:TaxAmount currencyID="SAR">1.8</cbc:TaxAmount>
		<cac:TaxSubtotal>
			<cbc:TaxableAmount currencyID="SAR">12
			</cbc:TaxableAmount>
			<cbc:TaxAmount currencyID="SAR">1.8</cbc:TaxAmount>
			<cac:TaxCategory>
				<cbc:ID>S</cbc:ID>
				<cbc:Percent>15</cbc:Percent>
				<cac:TaxScheme>
					<cbc:ID>VAT</cbc:ID>
				</cac:TaxScheme>
			</cac:TaxCategory>
		</cac:TaxSubtotal>
	</cac:TaxTotal>
	<cac:LegalMonetaryTotal>
		<cbc:LineExtensionAmount currencyID="SAR">12
		</cbc:LineExtensionAmount>
		<cbc:TaxExclusiveAmount currencyID="SAR">12
		</cbc:TaxExclusiveAmount>
		<cbc:TaxInclusiveAmount currencyID="SAR">13.8
		</cbc:TaxInclusiveAmount>
		<cbc:PrepaidAmount currencyID="SAR">0</cbc:PrepaidAmount>
		<cbc:PayableAmount currencyID="SAR">13.8
		</cbc:PayableAmount>
	</cac:LegalMonetaryTotal>
	<cac:InvoiceLine>
		<cbc:ID>1</cbc:ID>
		<cbc:UUID>b5da1543-98f0-4b99-8df9-d3a5ba5c0efb</cbc:UUID>
		<cbc:InvoicedQuantity>1.0</cbc:InvoicedQuantity>
		<cbc:LineExtensionAmount currencyID="SAR">12
		</cbc:LineExtensionAmount>
		<cac:TaxTotal>
			<cbc:TaxAmount currencyID="SAR">1.8</cbc:TaxAmount>
			<cbc:RoundingAmount currencyID="SAR">13.8
			</cbc:RoundingAmount>
		</cac:TaxTotal>
		<cac:Item>
			<cbc:Name>test</cbc:Name>
			<cac:StandardItemIdentification>
				<cbc:ID>111122223333009</cbc:ID>
			</cac:StandardItemIdentification>
			<cac:ClassifiedTaxCategory>
				<cbc:ID>S</cbc:ID>
				<cbc:Percent>15</cbc:Percent>
				<cac:TaxScheme>
					<cbc:ID schemeID="UN/ECE 5153">VAT</cbc:ID>
				</cac:TaxScheme>
			</cac:ClassifiedTaxCategory>
		</cac:Item>
		<cac:Price>
			<cbc:PriceAmount currencyID="SAR">12</cbc:PriceAmount>
			<cbc:BaseQuantity>1</cbc:BaseQuantity>
		</cac:Price>
	</cac:InvoiceLine>
</Invoice>

Response :

{
	"validationResults": {
		"infoMessages": [],
		"warningMessages": [],
		"errorMessages": [
			{
				"type": "ERROR",
				"code": "XSD_ZATCA_INVALID",
				"category": "XSD validation",
				"message": "Schema validation failed; XML does not comply with UBL 2.1 standards in line with ZATCA specifications. ERROR: org.xml.sax.SAXParseException; lineNumber: 75; columnNumber: 783; cvc-complex-type.2.4.a: Invalid content was found starting with element '{\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\":PaymentMeans}'. One of '{\"urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2\":AccountingCustomerParty}' is expected.",
				"status": "ERROR"
			}
		],
		"status": "ERROR"
	},
	"reportingStatus": "NOT_REPORTED"
}

Dear @sameh.kartngo

Thanks for reaching out, welcome to our community.

Please note that each XML must be comply with UBL2.1 standard, our recommendation are the below:

1- Install the latest version of our SDK which is 3.3.9 , kindly find the link Zatca.

2- After install the SDK successfully, navigate to this path zatca-einvoicing-sdk-238-R3.3.9\Data\Samples
to find comply samples for both type of invoices (Simplified, and Standard).

for any further support do not hesitate to reach our support team via below mail:

SP mail: sp_support@zatca.gov.sa

Thanks,
Ibrahem Daoud.

How to handle unknown customers ?

@sameh.kartngo you dont have to provide customer information (name, address and ID) on Simplified Invoices (B2C). In the XML just include below tags after closing AccountingSupplierParty tag. This will resolve XSD error.

 <cac:AccountingCustomerParty>
</cac:AccountingCustomerParty>
1 Like