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
| Response | What it means | What to do |
|---|---|---|
| Accepted | The invoice is compliant | Nothing |
| Accepted with warnings | A minor mistake that doesn't block acceptance | Investigate it and fix it for the next invoice |
| Rejected | A serious mistake makes the document invalid | Fix it and submit a new document with its own counter and hash |
ZATCA Detailed Guidelines for E-Invoicing, section 10.
Seller details
| Code | What the rule requires | What to check |
|---|---|---|
| BR-KSA-39 | The invoice must contain the seller's VAT number. | Add the VAT number in the company or issuing-unit settings. |
| BR-KSA-40 | The seller's VAT number has 15 digits, starting and ending with 3. | Check it against the registration certificate, and remove any spaces. |
| BR-KSA-08 | The 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-09 | The seller address must have street, building number, postal code, city, district and country. | Complete the national address of the company or branch. |
| BR-KSA-37 | The seller's building number has 4 digits. | Use the building number from the national address, not a shortened one. |
| BR-KSA-66 | The seller's postal code has 5 digits. | Correct it in the company details. |
Buyer details
| Code | What the rule requires | What to check |
|---|---|---|
| BR-KSA-44 | If 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-81 | If 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-14 | A 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-42 | The buyer name is required on a tax invoice and its notes. | Complete the customer name before issuing. |
| BR-KSA-10 | The buyer address must have street, city and country. This doesn't apply to simplified invoices. | Complete the address on the customer record. |
| BR-KSA-63 | If 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-67 | If the buyer's country is SA, the postal code has 5 digits. | Correct it on the customer record. |
Credit and debit notes
| Code | What the rule requires | What to check |
|---|---|---|
| BR-KSA-17 | A credit or debit note must state why it was issued. | Make the reason a required field on the note screen. |
| BR-KSA-56 | The original invoice reference is required on credit and debit notes. | Link the note to the original invoice number before issuing. |
VAT and amounts
| Code | What the rule requires | What to check |
|---|---|---|
| BR-KSA-18 | The VAT category code must be S, Z, E or O. | Map every item to one of the four categories. |
| BR-KSA-69 | A zero-rated VAT breakdown needs a reason code. | Add the reason code to zero-rated items. |
| BR-KSA-23 | An exempt VAT breakdown needs an exemption reason code. | Add the exemption code to the exempt item. |
| BR-KSA-24 | A not-subject-to-VAT breakdown needs a reason code. | Add the code, and check whether an invoice is needed at all. |
| BR-KSA-51 | The 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-04 | All 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
| Code | What the rule requires | What to check |
|---|---|---|
| BR-KSA-03 | The invoice must contain a UUID generated by the issuing machine. | Generate a new UUID for each document, and never reuse one. |
| BR-KSA-33 | Each invoice must have an invoice counter value. | Check the counter setup on the issuing unit. |
| BR-KSA-34 | The counter value contains digits only. | Remove prefixes and symbols. The counter is separate from your invoice number. |
| BR-KSA-61 | The 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-26 | The previous invoice hash must be base64-encoded SHA256. | Use the method in the standard, and don't change the file after hashing. |
| BR-KSA-27 | The document must contain a QR code in base64. | Check that the QR is generated with Phase 2 content. |
| BR-KSA-60 | A 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
| Code | What the rule requires | What to check |
|---|---|---|
| BR-KSA-04 | The issue date must not be after the current date. | Check the server clock and time zone, and don't future-date invoices. |
| BR-KSA-70 | The 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-01 | Dates must be formatted YYYY-MM-DD. | Use this format in the XML, however the date displays on screen. |
| BR-KSA-F-03 | The document must not contain empty elements. | Leave optional elements out of the file when they have no value. |
| BR-KSA-F-06 | Minimum 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 systemCommon 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.
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.