Do not correct an invoice described as rejected by guessing. First identify the actor, stage and exact file involved: an internal software check, XML validation, customer refusal, submission failure or platform response. As of 29 August 2026, we found no public DGI catalogue that supports presenting a universal set of Moroccan rejection codes. Preserve the exact message, check data in a stable order and never silently rewrite a document that has already been issued.

Six diagnostic habits
- Copy the message, code, time and filename before acting.
- Separate local errors, XML validation, recipient refusal and platform responses.
- Check seller, buyer, ICE, type, number, date and currency before calculations.
- Recalculate lines, VAT by rate, rounding and payable total.
- Compare exported XML, SHA-256 and visible document without altering the issued original.
- Use the proper correction workflow and retain the acknowledgement; never invent a DGI status.
1. Which system actually rejected the invoice?
Rejection can mean a protective warning before issue, an XSD structure error, a commercial dispute or failed transport. The source determines the response.
| Source | Meaning | First evidence |
|---|---|---|
| Software check | Missing field or inconsistent calculation before issue | Screenshot and draft |
| XML/XSD validation | Structure or data type rejected by the tested profile | Exact file, schema and error line |
| Customer or accountant | Identity, order, price or processing disputed | Message, order and delivery record |
| Submission channel | File, size, session, right or transport failed | Acknowledgement, time and attempt ID |
| Administration | Response to read under its official documentation | Complete code and wording |
A well-formed UBL file may still contain the wrong ICE, while a correct invoice may meet an expired session. Do not paraphrase either as a tax error.
2. The checklist in the right order
Work from stable identity to calculated values so that VAT is not reworked repeatedly when the document belongs to the wrong seller.
- Freeze the rejected file and record its fingerprint.
- Record legal type, number, issue date and currency.
- Check seller legal name, address and ICE.
- Check buyer identity and ICE where applicable.
- Compare lines with the source order or sale.
- Recalculate quantity, price, discount, net and rounding.
- Group taxable base and VAT by rate, then check payable total.
- Validate XML against the profile actually requested.
- Check filename, size, encoding and transmitted-file integrity.
- Read the acknowledgement and assign correction ownership.
| Check | Question | Generic failure |
|---|---|---|
| Identity | Did the right entity issue it? | Old ICE or address |
| Number | Is it unique, final and in sequence? | Draft or duplicate sent |
| Lines | Do quantity, unit and price agree? | Separator, discount or unit import |
| VAT | Do base, rate and amount reconcile? | Missing rate or rounding |
| Totals | Does net plus tax equal payable? | Visible total differs from XML |
| File | Is it the exact validated original? | XML changed after hashing |
For Moroccan invoice fields, start from the current CGI and your own situation, then have edge cases reviewed by the accountant. A technical checklist does not choose a tax regime.
3. Correct without destroying the audit trail
Correct a draft before issue. Once a final number is assigned, do not silently replace the original. Confirm with the accountant and channel whether the same file should be retried or a linked correction or credit note is required.
| Situation | Cautious action | Retain |
|---|---|---|
| Incomplete draft | Correct and rerun checks | Working version |
| File not sent | Confirm state before another attempt | Local log and hash |
| Transport failed | Retry the same file if permitted | Every attempt and acknowledgement |
| Wrong business data after issue | Use the approved document correction | Original, correction and link |
| Customer refusal | Qualify reason before reissuing | Order, delivery and exchange |
SHA-256 can show that two files are identical; it cannot say which is fiscally right. Link incident, decision, corrective document and new result.

Never repair final XML in a text editor
Changing ICE, date or total after sealing breaks the fingerprint and separates XML from PDF. Return to source data, use the correction workflow and retain the previous version.
4. What BelloPOS checks—and its limit
BelloPOS Go checks required merchant data, creates UBL 2.1 on issue, calculates SHA-256 and places the document in a local outbox. Individual export or a period ZIP with manifest gives the accountant the file and fingerprint.
BelloPOS does not transmit directly to DGI today, so it receives and interprets no DGI rejection catalogue. Its local state describes preparation, sealing and export, not administrative acceptance.
The function starts with the one-time Go licence. Pro adds quote, order, delivery, invoice and credit-note lineage. Compare plans against the corrections your workflow needs.
5. The minimum escalation pack
When diagnosis is insufficient, provide a reproducible pack without exposing more personal data than necessary.
- Number, type, date and issuer.
- Exact stage and responding system.
- Code and wording copied verbatim.
- Time, attempt ID and acknowledgement.
- Original XML and SHA-256.
- Visible-document screenshot.
- Line and rate calculation.
- Relevant order or delivery evidence.
- Actions tried and their result.
- Owner and operational deadline.
Mask unnecessary data in support screenshots while preserving the controlled original. An error becomes solvable when everyone can repeat the same check on the same file.
Mistakes to avoid
- Looking up invented DGI codes.
- Confusing customer refusal with technical rejection.
- Creating another number without checking the first.
- Editing sealed XML by hand.
- Correcting PDF but not structured data.
- Changing a rate merely to remove an imbalance.
- Discarding the acknowledgement after success.
- Sending an entire customer file to support unnecessarily.
Frequently asked questions
Is there an official DGI rejection-code list?
We found no universal public catalogue as of 29 August 2026. Preserve the real code and use the documentation for the official channel involved.
Does an XSD error mean VAT is wrong?
No. XSD mainly checks structure and types; fiscal and commercial correctness require other checks.
May I edit rejected XML?
Do not hand-edit a final sealed file. Correct source data and use the appropriate document process.
Must I create a new number?
Not automatically. Establish whether the first document was issued or received and validate the correction route.
Does BelloPOS receive DGI rejections?
No. It prepares and exports locally; direct DGI transport is not connected.
What should support receive?
The exact message, stage, protected example or file, hash, time and tests already run, with minimum personal data.
What to take away
Resolve rejection with evidence: identify the source, freeze the file, check identity then calculations, choose the correction and retain acknowledgements. Do not invent DGI codes or meaning until officially published.
Sources
The figures and rules quoted above come from these pages, read on the date given in the article.
- Moroccan General Tax Code 2026, DGI, read 29 August 2026
- Official Universal Business Language 2.1 specification, OASIS
- BelloPOS electronic invoicing and UBL export, read 29 August 2026
Prepare a checkable file
Test issue, UBL, fingerprint and period export in BelloPOS, then validate submission and correction with your accountant.
Read next
Other practical guides on the same subject: