Currency code (BT-5) must be according to ISO 4217:2005
What does this mean?
The element is cbc:DocumentCurrencyCode at invoice level. The alphabetic ISO 4217 codes are exactly three capital letters: SAR, USD, EUR, AED. The check is on the value's membership of that list and nothing else — not on what you sell, not on who you sell it to, not on whether the amounts are right.
A currency symbol is not a currency code. SR, the Arabic abbreviation, the word Riyal and the riyal sign are all names for the money on a printed document; none of them is a value in ISO 4217. Only the three letters go in this field.
The standard also has a numeric form — 682 for the riyal — which is another representation of the same currency. What we read from the compiled schematron is the text of each rule and its severity, not the test that fires it, so we cannot tell you how a numeric value is treated here. Every ZATCA example writes the three letters, so write them.
This rule and its sibling BR-KSA-CL-02 are two halves of one question: this one asks whether the value is valid, that one asks whether the whole document repeats it. A file that writes EUR in the header and SAR on one line passes here and fails there. And there is a third, entirely different field: the tax accounting currency (BT-6), whose existence is required by BR-KSA-68 and whose value is pinned to SAR by BR-KSA-EN16931-02.
Why does it happen?
Ordered from the most common to the least — your cause is most likely the first or the second.
- A point of sale or a template that prints the currency symbol on the page and passes the same string into the XML.
-
Lower case, from a database column holding
sar. - The currency name rather than its code — Saudi Riyal — taken from a settings field meant for display.
- An element emitted empty, or holding whitespace, from a mapping whose source value was null. No value is not a value in ISO 4217.
-
An invented or four-letter code:
SAUD,SRL,RS. -
A language or region tag picked up from a formatting library:
ar-SA.
How to fix it
3 steps, then send the invoice again.
-
1
Write the three letters
cbc:DocumentCurrencyCodewith the valueSAR, in capitals and with no surrounding whitespace. Write it as a constant in code rather than a setting read from the establishment: a Saudi invoice is in riyals and there is nothing here to derive — and every field that is derived is a field that can be wrong. -
2
Separate the presentation from the field
The symbol, the name and the abbreviation all belong to the printed document; this field is a value from a closed list read by a machine. One string cannot serve both, and that conflation is the root of this code: a settings field called currency used once for printing and once for export.
-
3
Then check consistency and the tax currency
Once the value is valid, two questions remain. Does every
currencyIDattribute on the amounts repeat it — that is BR-KSA-CL-02. And does the document carry a tax accounting currency of SAR — that is BR-KSA-68 and BR-KSA-EN16931-02. How to read a whole rejection response is in ZATCA error codes explained.
Once corrected, send the invoice again. A rejected invoice was never recorded with the Authority, so it needs no credit note — send the corrected invoice itself.
Does ZATCA Tools prevent it?
Yes, by the shape of the product rather than by validation. The value SAR is written as a literal in the payload builder under the key currencyCode, and there is no currency column anywhere in the product — not on the establishment, not on the invoice, not in an API payload, not in the store integrations — from which a different value could be derived. The value cannot be wrong because it is not configurable. The other half, in the same honesty: invoicing in a foreign currency is not supported here, and anyone billing in dollars will not be issuing from this system.
Related codes
Frequently asked questions
I sell in dollars. Can BT-5 be USD? +
USD is a valid ISO 4217 code and this rule checks nothing else. What does not change is the tax accounting currency (BT-6), which stays SAR under BR-KSA-EN16931-02. Whether your supply may be invoiced in a foreign currency at all is a tax question for zatca.gov.sa, not something the XML decides.Should I put the riyal symbol on the invoice? +
Does the case matter? +
ZATCA Tools builds the signature, the PIH, the counter and the encoding for you, and validates your data before it is sent. Start free, with no credit card.
Start for free