Technical reference

ZATCA e-invoice errors: BR-KSA codes

What BR-KSA codes in a Fatoora response mean, and what to check to fix each one.

What are BR-KSA codes?

BR-KSA codes are the rules ZATCA adds to check e-invoice files in Saudi Arabia, alongside European standard rules such as BR-CO. When a file breaks a rule, the Fatoora response gives its code and message. Format and field rules start with BR-KSA-F. Not every rule causes a rejection: breaking some of them returns a warning instead.

Read the response before changing anything

ResponseWhat it meansWhat to do
AcceptedThe invoice is compliantNothing
Accepted with warningsA minor mistake that doesn't block acceptanceInvestigate it and fix it for the next invoice
RejectedA serious mistake makes the document invalidFix it and submit a new document with its own counter and hash
The code alone isn't enough. Go by the message and level in your own response, because a rule can appear as either an error or a warning. A rejected invoice is not cancelled or credited: it was never cleared.

ZATCA Detailed Guidelines for E-Invoicing, section 10.

Seller details

CodeWhat the rule requiresWhat to check
BR-KSA-39The invoice must contain the seller's VAT number.Add the VAT number in the company or issuing-unit settings.
BR-KSA-40The seller's VAT number has 15 digits, starting and ending with 3.Check it against the registration certificate, and remove any spaces.
BR-KSA-08The seller ID must appear once with one scheme (CRN, MOM, MLS, 700, SAG, OTH), using letters and digits only.Enter one ID, such as the commercial registration, and remove symbols and duplicates.
BR-KSA-09The seller address must have street, building number, postal code, city, district and country.Complete the national address of the company or branch.
BR-KSA-37The seller's building number has 4 digits.Use the building number from the national address, not a shortened one.
BR-KSA-66The seller's postal code has 5 digits.Correct it in the company details.

Buyer details

CodeWhat the rule requiresWhat to check
BR-KSA-44If the buyer's VAT number appears on a non-export invoice, it has 15 digits, starting and ending with 3.Correct it on the customer record, or remove it if the customer isn't registered and use another ID.
BR-KSA-81If a tax invoice or its notes has no buyer VAT number, another buyer ID is required.Add a commercial registration, national ID or iqama to the customer record.
BR-KSA-14A buyer ID is required if the buyer isn't VAT registered, using one of the listed schemes.Choose the right ID type along with the number.
BR-KSA-42The buyer name is required on a tax invoice and its notes.Complete the customer name before issuing.
BR-KSA-10The buyer address must have street, city and country. This doesn't apply to simplified invoices.Complete the address on the customer record.
BR-KSA-63If the buyer's country is SA, street, building number, postal code, city, district and country are required.Complete the customer's national address.
BR-KSA-67If the buyer's country is SA, the postal code has 5 digits.Correct it on the customer record.

Credit and debit notes

CodeWhat the rule requiresWhat to check
BR-KSA-17A credit or debit note must state why it was issued.Make the reason a required field on the note screen.
BR-KSA-56The original invoice reference is required on credit and debit notes.Link the note to the original invoice number before issuing.

VAT and amounts

CodeWhat the rule requiresWhat to check
BR-KSA-18The VAT category code must be S, Z, E or O.Map every item to one of the four categories.
BR-KSA-69A zero-rated VAT breakdown needs a reason code.Add the reason code to zero-rated items.
BR-KSA-23An exempt VAT breakdown needs an exemption reason code.Add the exemption code to the exempt item.
BR-KSA-24A not-subject-to-VAT breakdown needs a reason code.Add the code, and check whether an invoice is needed at all.
BR-KSA-51The line amount with VAT must equal the line net amount plus the line VAT.Check rounding, and calculate each line the same way.
BR-KSA-F-04All document amounts and quantities must be positive.Don't use negative values for discounts or returns: use an allowance or a credit note.

Sequence and security

CodeWhat the rule requiresWhat to check
BR-KSA-03The invoice must contain a UUID generated by the issuing machine.Generate a new UUID for each document, and never reuse one.
BR-KSA-33Each invoice must have an invoice counter value.Check the counter setup on the issuing unit.
BR-KSA-34The counter value contains digits only.Remove prefixes and symbols. The counter is separate from your invoice number.
BR-KSA-61The previous invoice hash must exist in the invoice.Store the last document's hash per issuing unit, and use it in the next one.
BR-KSA-26The previous invoice hash must be base64-encoded SHA256.Use the method in the standard, and don't change the file after hashing.
BR-KSA-27The document must contain a QR code in base64.Check that the QR is generated with Phase 2 content.
BR-KSA-60A cryptographic stamp is required on simplified invoices and their notes.Make sure simplified invoices are signed with the production certificate before reporting.

Formats and dates

CodeWhat the rule requiresWhat to check
BR-KSA-04The issue date must not be after the current date.Check the server clock and time zone, and don't future-date invoices.
BR-KSA-70The document must contain an issue time in hh:mm:ss format.Send the time in this format, with Z if it's in UTC.
BR-KSA-F-01Dates must be formatted YYYY-MM-DD.Use this format in the XML, however the date displays on screen.
BR-KSA-F-03The document must not contain empty elements.Leave optional elements out of the file when they have no value.
BR-KSA-F-06Minimum and maximum character limits apply to each field.Check the field length in ZATCA's data dictionary.

Codes we couldn't find in the standard

People also search for BR-KSA-F-07, BR-KSA-F-08, BR-KSA-F-10, BR-KSA-F-13, BR-KSA-FC-01 and BR-KSA-98. We didn't find these in version 1.2 of the standard we reviewed. They may be in a newer version or in ZATCA's tools, so we give no meaning for them here. Go by the message in your response.

Rule meanings are summarised from ZATCA's XML Implementation Standard, version 1.2 (May 2023). The "what to check" column is our practical reading, not ZATCA's text. No specialist engineer has reviewed this page yet, so test any change in the simulation environment first.

Where emerge fits

The emerge accounting system handles some of these rules when issuing, such as the note reason, the zero-rate reason code and the ID of a buyer who isn't VAT registered. That doesn't make every error disappear: clean customer and item data still matters.

See the accounting system

Common questions

What does BR-KSA-44 mean?

If the buyer's VAT number appears on a non-export invoice, it must have 15 digits, starting and ending with 3. Check it on the customer record, or remove it if the customer isn't registered and use another ID.

What does BR-KSA-81 mean?

A tax invoice or its note has no buyer VAT number, so another buyer ID is required, such as a commercial registration, national ID or iqama.

What causes BR-KSA-17?

A credit or debit note doesn't state why it was issued. Make the reason a required field when creating the note.

Does every BR-KSA code mean the invoice was rejected?

No. A code can arrive as a warning with the invoice accepted, or as an error with it rejected. Go by the level in the Fatoora response.

Want to put this into practice in your business? Try it yourself, or ask us on WhatsApp.

Note

This guide is general information, not tax or legal advice. Regulations and deadlines change, and the final reference is what the Zakat, Tax and Customs Authority publishes. Check with your tax adviser before acting on it.