Guides & comparisonsInvoicingRetail in Morocco

Rejected electronic invoice: the checklist before correcting it

First identify who rejected what, then check identity, ICE, number, lines, VAT, totals, XML, fingerprint and submission evidence.

By BelloCommerce

·

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.

Checking a rejected electronic invoice in Morocco
Checking a rejected electronic invoice in Morocco.

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.

SourceMeaningFirst evidence
Software checkMissing field or inconsistent calculation before issueScreenshot and draft
XML/XSD validationStructure or data type rejected by the tested profileExact file, schema and error line
Customer or accountantIdentity, order, price or processing disputedMessage, order and delivery record
Submission channelFile, size, session, right or transport failedAcknowledgement, time and attempt ID
AdministrationResponse to read under its official documentationComplete 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.

  1. Freeze the rejected file and record its fingerprint.
  2. Record legal type, number, issue date and currency.
  3. Check seller legal name, address and ICE.
  4. Check buyer identity and ICE where applicable.
  5. Compare lines with the source order or sale.
  6. Recalculate quantity, price, discount, net and rounding.
  7. Group taxable base and VAT by rate, then check payable total.
  8. Validate XML against the profile actually requested.
  9. Check filename, size, encoding and transmitted-file integrity.
  10. Read the acknowledgement and assign correction ownership.
CheckQuestionGeneric failure
IdentityDid the right entity issue it?Old ICE or address
NumberIs it unique, final and in sequence?Draft or duplicate sent
LinesDo quantity, unit and price agree?Separator, discount or unit import
VATDo base, rate and amount reconcile?Missing rate or rounding
TotalsDoes net plus tax equal payable?Visible total differs from XML
FileIs 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.

SituationCautious actionRetain
Incomplete draftCorrect and rerun checksWorking version
File not sentConfirm state before another attemptLocal log and hash
Transport failedRetry the same file if permittedEvery attempt and acknowledgement
Wrong business data after issueUse the approved document correctionOriginal, correction and link
Customer refusalQualify reason before reissuingOrder, 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.

Checklist before correcting an electronic invoice
Checklist before correcting an electronic invoice.

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.

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: