BR-KSA-F-06-C25 Warning — the invoice is accepted

Buyer city (BT-52) empty, or longer than the limit

The city is the part everyone assumes is there, so an empty one almost always means a mapping fault rather than a missing fact: a column that was never matched, or a select whose first, empty option was submitted. A warning, not a rejection — the invoice is accepted and the note comes back with it.

The message text as the Authority sends it in English, unedited

Field character limits for the Buyer Address - City field (BT-52) have not been met. The minimum limit is 1 character and the maximum limit is 127 characters.

What does this mean?

What the Authority's live API returns, verbatim: [BR-KSA-F-06-C25] - Field character limits for the Buyer Address - City field (BT-52) have not been met. The minimum limit is 1 character and the maximum limit is 127 characters. That text matches the SDK extract printed at the top of this page word for word — unlike the street rule BR-KSA-F-06-C23, where the two disagree on the maximum.

The field is BT-52 — cbc:CityName inside cac:AccountingCustomerParty/cac:Party/cac:PostalAddress. It is a length rule: it counts characters and asks nothing about presence. Fewer than one fails, more than 127 fails.

Zero characters reaches the validator by two roads: an element written empty, such as <cbc:CityName/>, and an element that was never written. We saw the warning come back on a standard invoice whose buyer address was empty throughout, generated by a system that does not write empty address elements at all — so do not assume that leaving the element out silences a length rule.

One thing sets this field apart from the street and the district: a city is not hard information to obtain. Every buyer knows their city, every purchase form asks for it, every shipping address carries it. So when the field arrives empty, nine times in ten the fact is not missing — it simply did not arrive: a column that was never matched during an import, a web form field named town while the mapping reads city, or a select whose first, empty option was submitted. Look in the mapping before you look in the customer record.

Three rules speak about the city from three angles and return together in one response: BR-KSA-10 asks for a street, a city and a country code on a tax invoice and its notes, BR-KSA-63 asks for the six elements of a Saudi buyer address, and this one measures the length. A real city in its own field settles all three.

It is a warning: the invoice is cleared and the note recorded with it, so nothing is held up. But a tax invoice with no buyer city is an incomplete document in the buyer's books before it is one in yours, their accounts team may ask about it, and the warning returns on every invoice to that customer while their record is unchanged.

Why does it happen?

Ordered from the most common to the least — your cause is most likely the first or the second.

  • A city select whose first option is Choose a city with an empty value, submitted as it stands and written out as an element with nothing in it.
  • An import from a spreadsheet whose column is headed Town, Region or Province, never matched to the city column, leaving the field empty.
  • An address taken from a checkout that does not require a city — common in stores that deliver by map pin, where coordinates are enough for the driver and not enough for a tax document.
  • City and district swapped in the mapping, so the district field holds the city and the city field is left empty. This happens often when the foreign system names the two fields city and district in a different order from your own form.
  • An administrative region written in the city field and then cleared during a clean-up: Eastern Province is not a city, and whoever removed it put nothing in its place.
  • The maximum from the other side — rare, but it happens: a whole address line, or a city name written in two languages with a description between them, in a field limited to 127 characters.

How to fix it

4 steps, then send the invoice again.

  1. 1
    Inspect the mapping before you inspect the customer

    Take one invoice that carried the warning and look at the XML that was sent. If <cbc:CityName/> is there and empty, the fault is in the serialisation; if it is absent, the fault is at the source. Then check the customer record in your own system: if the city is present there and the field still arrives empty, the problem is the match between your column and BT-52 — and that is fixed once, for every invoice that follows.

  2. 2
    A city is a city — not a region, and not a district

    Write the city name into BT-52 as the national address gives it: Riyadh, Jeddah, Khobar. An administrative region is not a city, and the district has a field of its own (KSA-4) with a rule of its own, BR-KSA-F-06-C28. Moving a value from one to the other so that both fields are full makes the document state something untrue about the buyer.

  3. 3
    Turn an empty value into an absent one

    In the mapping: convert the empty string, the Choose placeholder and the whitespace-only value into absence before the payload is built, not after. An empty element inside a signed document serves nobody; and do not pad it with a dash or a dot to satisfy the one-character minimum, because that is a value that passes the rule and misleads whoever reads the invoice.

  4. 4
    Correct the record — the issued invoice is not reissued

    The document that carried the warning was cleared and does not need reissuing. Correct the city in the customer record and their next invoices go out clean. The quickest route to the rest of the address is the buyer's national short address; the six buyer fields and the rule behind each are set out in the tax invoice requirements checklist.

This code does not block acceptance, so the invoice you have is compliant. Correct the data so the warnings disappear from future invoices.

Does ZATCA Tools prevent it?

On the buyer side, yes. A customer city in ZATCA Tools is written as the merchant entered it, or as it resolved from the buyer's national short address, and no path anywhere in the product substitutes another city for a missing one. A field left blank — or typed as spaces, which the normalisation strips — is dropped from the payload before it is built, the XML generator writes the element only when it has a value, and the signing library refuses an empty string in this field. A test in the repository holds that a missing part is absent rather than written empty or padded with a mark. Two warnings come before any of that: a line under the customer name on the invoice form naming what the address is short of, and a dialog at issue time naming it again and offering Complete the details or Continue. The other half, in the same honesty, and it is on the seller side rather than the buyer's: the payload builder carries default values for the establishment address when the record holds none, a default city among them. That is a different field, BT-37, under a different code, BR-KSA-F-06-C7, not the one you are reading about here; we say it because anyone looking at all the address warnings on their own invoices deserves to know which come from their data and which from ours. That gap is chased separately by the establishment-details notice on the dashboard and in settings until it is filled.

Related codes

Frequently asked questions

Was my invoice rejected because of this code? +
No. It is a warning: the invoice is cleared and the warning is recorded with it. If it really was rejected, the code that did it is in errorMessages, not warningMessages. How to read the whole response is in ZATCA error codes explained.
The customer will not say which city, and I do not know it. What do I write? +
Nothing you have to invent. A guessed city on a tax invoice is worse than a recorded warning: the warning says the field is short, the guess says something untrue about the buyer. Ask for their national short address, and until it arrives, issue with the field absent.
Can I put the region in if I do not know the city? +
No. An administrative region is not a city, and BT-52 is read by the validator and by whoever reviews your invoice. A value that satisfies one character while describing something else silences the code without mending the document.
The city name is in Arabic and English together. Does that break the limit? +
The limit is 127 characters, and a city name in two languages stays well inside it. What usually exceeds the limit is a whole address line placed in the city field, not a bilingual name. Write it in one language in any case: the field is for the city, not for its translation.
My simplified invoices never carry this warning. Why? +
Because a simplified invoice normally carries no buyer address at all, so there is no city field in it to measure. What each document type carries is set out in standard versus simplified tax invoices.
You fixed this one — now avoid the next

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

← All ZATCA error codes