Document types

Read this page when your app builds the request body of a document, or when it gets an error about the document type. For the steps to submit a document, refer to Submit a document.

This page uses these terms:

  • Taxpayer: a business from which your organization has an active grant. On an invoice or a credit note that your app submits, the taxpayer is the seller.
  • Buyer: the business that receives the document.
  • Document: an invoice or a credit note.
  • Self-billed document: an invoice or a credit note that the buyer issues, under a self-billing agreement with the seller. On a self-billed document, the taxpayer is the buyer.
  • FTA: the UAE Federal Tax Authority. Wafeq e-invoicing ASP reports each document to the FTA.
  • Document type: the code that tells the FTA what kind of document it is. For example, 380 is a tax invoice.
  • TRN: the VAT registration number of a business: 15 digits, ending in 03. A seller with a TRN is registered for VAT.
  • TIN: the 10-digit number that the FTA gives a business.
  • VAT category: the code on each line that tells how VAT applies to the line. The codes are S (standard-rated), Z (zero-rated), E (exempt) and O (out of scope). Refer to VAT on each line.
  • Legal registration: the registration that legally identifies a business or a person. It is a trade or commercial licence (TL), an Emirates ID (EID), a passport (PAS) or a Cabinet decision (CD).
  • Special scenario: a type of sale that the UAE rules mark with a flag in transaction_type_code. Refer to Special scenarios.
  • Summary invoice: a special scenario. The seller issues one tax invoice for several sales to the same buyer in the same calendar month.
  • Deemed supply: a special scenario. The seller supplies goods or services without payment, and VAT treats this as a sale.

Two examples show how Wafeq e-invoicing ASP picks the document type:

Example 1: a seller with a TRN. A furniture trader is registered for VAT. It sells office chairs to a buyer at the standard rate. The invoice is a tax invoice (380). A separate document containing only exempt (E) or out-of-scope (O) items, with any document discounts and charges also E or O, is a commercial invoice (480). Zero-rated (Z) supplies do not qualify for 480.

Example 2: a seller without a TRN. A small business is not registered for VAT. It has a TIN only, and its invoices use the commercial type (480). Every line, document discount and document charge must be exempt (E) or out of scope (O). Wafeq e-invoicing ASP refuses zero-rated (Z), standard-rated, reverse-charge and margin-scheme supplies from this seller.

Each document that Wafeq e-invoicing ASP reports to the FTA has a document type. Your app chooses the endpoint: an invoice or a credit note. By default, the API picks the type from these details. Your app can also require a type.

  • The TRN of the seller. Wafeq e-invoicing ASP takes it from the registered profile of the taxpayer, not from your request.
  • The VAT category of each line, document discount and document charge.

The six document types

TypeNameWhat it isEndpoint
380Tax invoiceThe usual invoice of a seller with a TRN.POST /invoices
480Commercial invoiceAn invoice outside the scope of VAT.POST /invoices
381Tax credit noteA credit note for a tax invoice.POST /credit-notes
81Commercial credit noteA credit note for a commercial invoice.POST /credit-notes
389Self-billed invoiceAn invoice that the buyer issues, under a self-billing agreement with the seller.POST /self-billing/invoices
261Self-billed credit noteA credit note for a self-billed invoice.POST /self-billing/credit-notes
🚧

"Commercial invoice" has two meanings

In the UAE, a commercial invoice is an invoice outside the scope of VAT (480). It is different from a tax invoice (380). The international code list of these numbers gives 380 the name "Commercial invoice". When a UAE accountant says "commercial invoice", the accountant means 480.

How Wafeq e-invoicing ASP picks the type

Wafeq e-invoicing ASP uses this table for invoices:

The sellerThe linesDocument type
Has a TRNOne or more lines are standard-rated (S), zero-rated (Z), reverse charge (AE) or margin scheme (N).380 tax invoice
Has a TRNEvery line, document discount and document charge is exempt (E) or out of scope (O).480 commercial invoice, as explained below.
Has no TRNEvery line, document discount and document charge is exempt (E) or out of scope (O).480 commercial invoice
Has no TRNAny line, document discount or document charge is zero-rated (Z).Refused: document_type_mismatch
Has no TRNOne or more lines are standard-rated (S), reverse charge (AE) or margin scheme (N).Refused: seller_without_trn_taxable_lines

These rules apply to the other documents:

  • Credit notes. Wafeq e-invoicing ASP uses the same table. The result is 381 instead of 380, and 81 instead of 480.
  • Credit notes for an invoice that your app submitted through Wafeq e-invoicing ASP. Such a credit note refers to the invoice with previous_document_id. It gets the type of that invoice: 381 for a 380, and 81 for a 480. Every new 81 must use only E or O on its lines, document discounts and document charges. An older 480 containing Z does not provide an exception. A new credit note that carries disallowed categories is refused; the original stays unchanged. Refer to Correct or cancel a document.
  • Self-billed documents. The type is always 389 for an invoice and 261 for a credit note.
  • Corrections of rejected documents and void credit notes. Both create a new document and must satisfy the same category restrictions. A new 480/81 cannot retain Z from an older commercial document. The original keeps its recorded type. See Correct or cancel a document.

Existing documents and accepted payloads keep their recorded types and contents. Replaying an already completed request with the same idempotency key returns its original response. A restored draft or a new correction, credit note or void request must pass the current rules.

For more about the VAT categories, refer to VAT on each line.

Exempt-only documents

The official Peppol rule IBR-151-AE requires a 380/381 to contain a line with a category other than E or O. A document whose lines, document discounts and document charges are all E or O is therefore a 480/81, also for a VAT-registered seller. The official PINT AE specification associates 480/81 with exempt and out-of-scope supplies.

Section 18.3.1 of the UAE Electronic Invoicing Guidelines v2.0 says that 480 should not be used for exempt supplies. It conflicts with IBR-151-AE, which leaves no valid tax type for an exempt-only document. Wafeq e-invoicing ASP follows the official validation rules.

If your app requires 380/381 for such a document, official validation refuses it with SCH:ibr-151-ae. All-E/O lines with a taxable document discount or charge fit neither type and are also refused. Keep the correct VAT categories; do not change them to bypass validation.

What a commercial invoice or a commercial credit note needs

These rules apply to the types 480 and 81:

  • Every line, document discount and document charge must be exempt (E) or out of scope (O). Zero-rated (Z) supplies cannot use these types. This applies whether the API selects the commercial type or your app requests it. A violation returns document_type_mismatch before transport.
  • The legal registration of the buyer is necessary. Send it in customer.legal_registration. For a trade licence, send {"type": "TL", "id": "CN-7654321", "authority": "Dubai Economy and Tourism"}. Without it, Wafeq e-invoicing ASP refuses the document with buyer_legal_registration_required.
  • The document cannot be a summary invoice or a deemed supply. If transaction_type_code has one of these flags, Wafeq e-invoicing ASP refuses the document with transaction_flags_not_allowed. If your app requested the commercial type in document_type_code, the error is document_type_mismatch. Refer to Special scenarios.

When the seller has no TRN, Wafeq e-invoicing ASP puts the TIN of the seller in the document. Your app sends nothing more for this.

Check the type before you submit

Send the request body to POST /invoices/validate, or to POST /credit-notes/validate for a credit note. Use the same body that your app will submit. Wafeq e-invoicing ASP keeps nothing, delivers nothing and reports nothing. The response gives the type in invoice_type_code. For example, the check of the second example below gives this response:

{
  "valid": true,
  "invoice_id": "INV-2026-0302",
  "invoice_type_code": "480",
  "profile_execution_id": "00000000",
  "effective_recipient_id": "0235:1999200000",
  "route": "delivery",
  "errors": [],
  "warnings": [],
  "info": []
}

After the submission, the response of POST /invoices also gives the type in invoice_type_code.

Require a document type

Usually, your app does not send a type, and Wafeq e-invoicing ASP picks it with the rules on this page. If your app must get one type, send it in document_type_code:

  • For an invoice: 380 or 480.
  • For a credit note: 381 or 81.

Wafeq e-invoicing ASP does not change a type that your app sends. A type that conflicts with the seller, supplies or original invoice is refused with document_type_mismatch. A compatible type must still pass the official validation rules, including IBR-151-AE for exempt-only documents.

The API accepts these combinations, subject to official validation:

  • 380 or 381: the seller has a TRN. Official validation additionally requires at least one line with a category other than E or O.
  • 480 or 81: all lines, document discounts and document charges must use E or O, whether or not the seller has a TRN. Zero-rated (Z) supplies cannot use these types. The other commercial-document rules above also apply.
  • A credit note with previous_document_id: 381 for a 380, and 81 for a 480, subject to the same category restrictions for the seller.

invoice_type_code is not the same field. If your app sends invoice_type_code, Wafeq e-invoicing ASP ignores it.

Examples

These two invoices go to the same buyer. Only the lines are different. The seller has a TRN.

A tax invoice (380). The seller sells office chairs at the standard rate:

{
  "invoice_number": "INV-2026-0301",
  "issue_date": "2026-10-15",
  "due_date": "2026-11-14",
  "source_id": "erp-invoice-9301",
  "customer": {
    "id": "0235:1999200000",
    "name": "Gulf Fresh Foods LLC",
    "vat_number": "199920000000003",
    "legal_registration": { "type": "TL", "id": "CN-7654321", "authority": "Dubai Economy and Tourism" },
    "address": { "street": "Warehouse 7, Al Quoz Industrial 3", "city": "Dubai", "country": "AE", "country_subentity": "DXB" }
  },
  "line_items": [
    { "description": "Office chairs", "quantity": 10, "unit_price": 450, "tax_category": "S", "tax_percent": 5 }
  ]
}

A commercial invoice (480). The same seller records compensation outside the scope of VAT. Every line is O, and there are no document discounts or charges:

{
  "invoice_number": "INV-2026-0302",
  "issue_date": "2026-10-15",
  "due_date": "2026-11-14",
  "source_id": "erp-invoice-9302",
  "customer": {
    "id": "0235:1999200000",
    "name": "Gulf Fresh Foods LLC",
    "vat_number": "199920000000003",
    "legal_registration": { "type": "TL", "id": "CN-7654321", "authority": "Dubai Economy and Tourism" },
    "address": { "street": "Warehouse 7, Al Quoz Industrial 3", "city": "Dubai", "country": "AE", "country_subentity": "DXB" }
  },
  "line_items": [
    {
      "description": "Compensation outside the scope of VAT",
      "quantity": 1,
      "unit_price": 8000,
      "tax_category": "O",
      "tax_percent": 0,
      "tax_exemption_reason_code": "VATEX-AE-OOS",
      "tax_exemption_reason": "Outside the scope of VAT"
    }
  ]
}

If the seller has no TRN, the second invoice is also a 480. But Wafeq e-invoicing ASP refuses the first invoice, because a seller without a TRN cannot charge VAT.

Common errors

The check gives these codes in errors. A submission gives them in status, with success: false.

seller_without_trn_taxable_lines

  • Cause: the seller has no TRN, and a line, document discount or document charge is standard-rated (S), reverse charge (AE) or margin scheme (N).
  • Action: confirm the seller's registration and the actual tax treatment. Commercial documents from a seller without a TRN accept only E or O; do not change a genuine supply's category to bypass validation.

buyer_legal_registration_required

  • Cause: the document is a 480 or an 81, and it has no legal registration for the buyer.
  • Action: send customer.legal_registration.

transaction_flags_not_allowed

  • Cause: the document is a 480 or an 81, and it has the summary invoice flag or the deemed supply flag.
  • Action: remove the flag. A commercial invoice or a commercial credit note cannot have these two flags.

document_type_mismatch

  • Cause: the requested or derived type conflicts with the seller, supplies or original invoice. For example, any 480/81 containing a zero-rated, standard-rated or reverse-charge line, document discount or charge; or a 380 from a seller without a TRN. This includes new credit notes, corrections and void credit notes based on older commercial documents. The check gives this code in errors. A submission is refused with HTTP 422, and nothing is sent.
  • Action: read the rule in the message and correct inaccurate input. Keep genuine VAT categories and the original invoice's type requirements; do not relabel Z or switch types to bypass validation. Omitting document_type_code still applies the same rules.

Document types