Submit a document

Stage 3 of 6. Submit each invoice and credit note of a taxpayer to Wafeq e-invoicing ASP. Wafeq e-invoicing ASP then delivers it and reports it to the FTA.

This page uses these terms:

  • Taxpayer: a business from which your organization has an active grant. On each document that your app submits, the taxpayer is the seller.
  • Buyer: the business that receives the document.
  • Document: an invoice or a credit note. This page shows invoices. Credit notes use POST /credit-notes and POST /credit-notes/validate in the same way.
  • Peppol ID: the address of a business on Peppol. For a UAE business, it is 0235: followed by the TIN of the business.
  • TIN: the 10-digit number that the FTA gives a business.
  • VAT TRN: the VAT registration number of a business: 15 digits, ending in 03.
  • 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).
  • FTA placeholder address: an address that Wafeq e-invoicing ASP uses instead of the Peppol ID of the buyer. Wafeq e-invoicing ASP uses it when it reports a document to the FTA only.

Your app submits each document in two calls:

  1. A check, with POST /invoices/validate. Wafeq e-invoicing ASP runs all its checks. It keeps nothing, delivers nothing and reports nothing.
  2. The submission, with POST /invoices and the same request body. Wafeq e-invoicing ASP checks the document again, then delivers it and reports it to the FTA.

Before you start

Submit a document: the five steps

StepActionResult
1Collect the details of the buyer.Wafeq e-invoicing ASP can find the buyer, or can report to the FTA only.
2Build the request body.The body describes the sale.
3Check the document.You know if the document is correct, and where it will go.
4Submit the document.Wafeq e-invoicing ASP accepts the document, or refuses it.
5Read the response.Your app knows what to do next.

Step 1: Collect the details of the buyer

The details of the buyer decide where the document goes. Keep these details for each buyer in your app, and send them in customer:

  • Address, in customer.address. Always send it. For a UAE buyer, put the code of the emirate in country_subentity, for example DXB. Refer to Emirate codes. For a buyer outside the UAE, put its region, for example its state or county.
  • TIN, in customer.id, written as 0235:<TIN>. Send it when the buyer has a UAE TIN, also when the buyer is not on Peppol yet. This includes a buyer outside the UAE that is registered for UAE VAT. For a buyer without a UAE TIN, send its Peppol ID in the scheme of its country, if it has one.
  • VAT TRN, in customer.vat_number. Send it when the buyer is registered for VAT.
  • Legal registration, in customer.legal_registration. It is necessary on commercial invoices (480) and commercial credit notes (81). Refer to Document types.

One more field is necessary in one case only: when you send neither a UAE TIN nor a VAT TRN for the buyer. In this case, send customer.identifier. The UAE rules then require a number that identifies the buyer. A buyer outside the UAE usually has neither. For such a buyer, send customer.identifier, for example its tax number in its own country or its company registration number.

  • The identifier must not be blank. Identifiers without a scheme remain accepted for compatibility, including existing registration numbers.
  • To state its type, add customer.identifier_scheme, a 4-digit ISO 6523 code. A scheme requires an identifier. For scheme 0235, the value must be exactly 10 ASCII digits: the UAE TIN. Do not label a VAT TRN, trade licence or Emirates ID as 0235; send legal registration in customer.legal_registration.
  • For a foreign identifier, use its applicable scheme. Other scheme-specific rules are checked during PINT-AE validation.
  • In the PINT-AE specification, this field is the buyer identifier (IBT-046).

Invalid identifier pairs return HTTP 422 before validation or submission. The same
checks apply to supplier.identifier and supplier.identifier_scheme on self-billed
documents. Existing documents and their stored identifiers remain readable.

Wafeq e-invoicing ASP then routes the document by these rules:

The buyer has a TIN and is on Peppol.

  • Send: customer.id as 0235:<TIN>.
  • Result: Wafeq e-invoicing ASP delivers the document to the buyer's e-invoicing provider, and reports it to the FTA.

The buyer has a TIN but is not on Peppol.

  • Send: customer.id as 0235:<TIN>, the same as above.
  • Result: Wafeq e-invoicing ASP looks for the buyer on Peppol and does not find it. Wafeq e-invoicing ASP does not deliver the document. Wafeq e-invoicing ASP reports it to the FTA only, with the FTA placeholder address 0235:9900000098 instead of the Peppol ID of the buyer. The TIN of the buyer stays in the document as its identifier.
  • Later: Wafeq e-invoicing ASP looks for the buyer again for each new document. When the buyer joins Peppol, Wafeq e-invoicing ASP delivers the documents that your app submits after that. Wafeq e-invoicing ASP does not deliver the earlier documents again.

You know the VAT TRN of the buyer, but not its TIN.

  • Send: customer.vat_number. Do not send customer.id.
  • Result: Wafeq e-invoicing ASP reports the document to the FTA only, also if the buyer is on Peppol. Without the TIN, Wafeq e-invoicing ASP cannot look for the buyer on Peppol. Ask the buyer for its TIN. Key terms tells you where a TIN comes from.

The buyer has no TIN and no VAT TRN.

  • Send: customer.identifier. Do not send customer.id.
  • Result: Wafeq e-invoicing ASP reports the document to the FTA only. Without an identifier, Wafeq e-invoicing ASP refuses the document (SCH:ibr-135-ae).

For exports and deemed supplies, Wafeq e-invoicing ASP uses other FTA placeholder addresses. Refer to Who receives the document.

Step 2: Build the request body

Put the data of the sale in the request body:

  • The buyer, from step 1.
  • The lines: for each line, the item, the quantity, the price, and the VAT category and rate. Refer to VAT on each line.
  • The special scenario, if the sale is one, in transaction_type_code. Refer to Special scenarios.
  • Your own ID for the document, in source_id. Each event about the document contains this value.
  • The currency, if the amounts are not in UAE dirhams (AED): currency, with currency_exchange_rate. Refer to Documents in another currency.
  • The tax amount type, if your prices include VAT: "tax_amount_type": "TAX_INCLUSIVE". Then the amount due is the amount that you charge. Refer to Prices that include VAT.
  • A note, if the document needs one, in notes. Wafeq e-invoicing ASP writes it on the e-invoice as the note of the document.

Do not send the seller or the totals. Wafeq e-invoicing ASP adds them. Wafeq e-invoicing ASP takes the seller from the registered profile of the taxpayer.

Wafeq e-invoicing ASP also selects the document type from the seller and the lines. To request a type, send document_type_code. Refer to Require a document type.

Each invoice number can be used one time only for each taxpayer. Wafeq e-invoicing ASP refuses a number that the taxpayer already used.

Example:

{
  "invoice_number": "INV-2026-0042",
  "issue_date": "2026-10-15",
  "due_date": "2026-11-14",
  "source_id": "erp-invoice-8812",
  "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 }
  ]
}

Card payments

For an invoice or self-billed invoice paid by card, include the card details in
payment_means.card:

"payment_means": {
  "code": "54",
  "card": {
    "account_number_suffix": "1234",
    "network_id": "VISA",
    "holder_name": "A Customer"
  }
}

Use code 48 for a bank card, 54 for a credit card, or 55 for a debit card.
account_number_suffix must contain only the last 4–6 digits of the card number;
do not send the full number. network_id identifies the card network and must
not be blank. holder_name is optional. Wafeq e-invoicing ASP writes these details
on the e-invoice; it does not take a card payment.

Invalid payment details return 422 with field diagnostics. The response omits
rejected payment values, including malformed payment objects and their contents.

The public credit-note APIs do not accept payment_means. File imports do not
currently have card-detail columns.

Final invoices after already-invoiced advances

For an advance that already has its own e-invoice, send the remaining net amount
on each final invoice line. Keep the VAT category and rate of that supply. Your
ERP allocates each advance to the supplies it covers; Wafeq e-invoicing ASP
calculates and validates VAT from the final lines you submit.

Add preceding_invoices to identify every advance invoice. This works for ordinary
and self-billed invoices:

"preceding_invoices": [
  { "invoice_number": "ADV-2026-001", "issue_date": "2026-10-01" },
  { "invoice_number": "ADV-2026-002" }
]

Each number is required and must be nonblank, with at most 64 characters. The
issue date is optional; when known, use YYYY-MM-DD. The API accepts up to 100
references per invoice. This is an API capacity limit. These are the original
invoice numbers, not Wafeq e-invoicing ASP document IDs. References do not look up
other documents, allocate advances, or change totals.

For example, a sale of AED 10,000 before VAT, all at 5%, with an already-invoiced
advance of AED 1,000 before VAT leaves AED 9,000 on the final invoice. Its VAT is
AED 450 and the amount due is AED 9,450. Reference the advance invoice without
deducting its AED 1,050 gross amount again.

For mixed VAT rates, apply the advance to the supplies it actually covers. If
item A is AED 6,000 at 5% and item B is AED 4,000 at 0%, an advance of AED 3,000
before VAT allocated entirely to A leaves final lines of AED 3,000 at 5% and
AED 4,000 at 0%. Final VAT is AED 150 and the amount due is AED 7,150. Supply the
applicable zero-rating reason as usual.

This implements Appendix 5, sections 17.1–17.1.1, of the UAE Electronic Invoicing
Guidelines v2.0 (26 October 2026). For these already-invoiced advances, Appendix 5
allows the Paid Amount to remain blank: the final lines already reflect the
advance. The API does not implement an additional Paid Amount deduction from a
full-value final invoice. Sending paid_amount or prepaid_amount returns HTTP
422, preventing an unsupported input from being silently ignored.

Appendix 5 also permits an invoice note identifying the advance invoice. If your
integration cannot yet send structured references, put the number and, when
known, date in notes; the note is retained in the invoice XML. Prefer structured
references when available.

Credit notes retain their separate previous_invoice_source and related fields;
see Correct or cancel a document. Those
credit-note fields are refused on ordinary and self-billed invoices; use
preceding_invoices instead. Credit notes do not accept this new array.

Step 3: Check the document

Send the request body to POST /invoices/validate. Send the headers of the taxpayer:

curl https://api.wafeq.com/ae/v1/invoices/validate \
  -H "Authorization: Api-Key $API_KEY" \
  -H "x-ae-taxpayer-id: $TAXPAYER_ID" \
  -H "x-ae-grant-id: $GRANT_ID" \
  -H "Content-Type: application/json" \
  -d @invoice.json

Wafeq e-invoicing ASP runs all the checks of a submission. Wafeq e-invoicing ASP keeps nothing, delivers nothing and reports nothing. Your app can check a document as often as necessary, for example each time the user saves it.

A correct document gives this response:

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

The response tells you what the submission will do:

  • invoice_type_code: the document type.
  • effective_recipient_id: the address of the document. This is the Peppol ID of the buyer, or an FTA placeholder address.
  • profile_execution_id: the special scenarios, as the 8 flags of transaction_type_code. 00000000 means none.
  • route: where the document will go.
routeMeaning
deliveryWafeq e-invoicing ASP will deliver it to the buyer and report it to the FTA.
reporting_onlyWafeq e-invoicing ASP will report it to the FTA only.
undeliverableThe buyer is not on Peppol, and the document cannot go to the FTA only.
unconfirmedWafeq e-invoicing ASP could not look for the buyer at this time, or the check stopped early.

The submission looks for the buyer again. Thus the route can change between the check and the submission.

A document with an error gives this response:

{
  "valid": false,
  "invoice_id": "INV-2026-0042",
  "invoice_type_code": "380",
  "route": "delivery",
  "errors": [
    {
      "code": "SCH:ibr-167-ae",
      "message": "[ibr-167-ae]-Line VAT information (IBG-30) with Invoiced item VAT category code (IBT-151) as 'Exempt from VAT' MUST have a VAT exemption reason code (IBT-186).",
      "severity": "error"
    }
  ],
  "warnings": [],
  "info": []
}

Show each error to your user before the user finalizes the document. A code that starts with SCH: names an official UAE rule. Its message uses the field numbers of the PINT-AE specification:

  • IBT-… is a field.
  • IBG-… is a group of fields.
  • BTAE-… is a field that only the UAE uses.

The example above means that an exempt line has no exemption reason code (tax_exemption_reason_code). For all error codes, refer to Errors.

Step 4: Submit the document

When the check passes and your user finalizes the document, send the same body to POST /invoices. Add an Idempotency-Key header:

curl https://api.wafeq.com/ae/v1/invoices \
  -H "Authorization: Api-Key $API_KEY" \
  -H "x-ae-taxpayer-id: $TAXPAYER_ID" \
  -H "x-ae-grant-id: $GRANT_ID" \
  -H "Idempotency-Key: erp-invoice-8812-3f9a1c" \
  -H "Prefer: respond-async" \
  -H "Content-Type: application/json" \
  -d @invoice.json

Idempotency-Key makes the submission safe to repeat:

  • Make one key for each version of the document. For example, use your document ID and a short hash of the body.
  • A key has 1 to 128 visible ASCII characters.
  • Store the key before your app sends the request.
  • Send a key with each submission. Without a key, Wafeq e-invoicing ASP refuses a document that goes to the FTA only, and a queued submission (idempotency_key_required).

Prefer: respond-async asks for queued delivery. Send it with each submission:

  • Wafeq e-invoicing ASP accepts the document and answers immediately with 202. Then Wafeq e-invoicing ASP delivers the document in the background.
  • If Wafeq e-invoicing ASP withdraws the report later (the buyer's provider rejects the document, or the delivery misses a deadline), your app can submit a correction. Wafeq e-invoicing ASP accepts a correction only for a document that your app submitted with this header. Refer to Correct or cancel a document.
  • Without this header, the call waits until the delivery to the buyer's provider ends.

Step 5: Read the response

Use the status field to decide what to do. Do not use the success field for this. Store document_id: this ID identifies the document from now on.

202, status: queued

  • Meaning: Wafeq e-invoicing ASP accepted the document. The delivery to the buyer runs in the background.
  • Next: track the document (stage 4). The Location header points to the status of the delivery.

202, status: reporting_only

  • Meaning: Wafeq e-invoicing ASP accepted the document. Wafeq e-invoicing ASP reports it to the FTA only.
  • Next: track the report to the FTA (stage 4).

200, status: delivered

  • Meaning: Wafeq e-invoicing ASP accepted the document and delivered it to the buyer's provider.
  • Next: track the report to the FTA (stage 4).

200, status: failed, with a document_id

  • Meaning: Wafeq e-invoicing ASP accepted the document and reports it to the FTA. The delivery to the buyer's provider failed.
  • Next: do not submit the document again. Track it (stage 4).

200, success: false, any other status

  • Meaning: Wafeq e-invoicing ASP refused the document. Wafeq e-invoicing ASP kept nothing.
  • Next: read error and validation_errors. Correct the document, check it again and submit it again. A changed body needs a new Idempotency-Key.

Other responses, for example 402, 409, 422, 429 and 503, are in Errors.

If a submission gets no response

This section is not a step. Sometimes your app does not know if Wafeq e-invoicing ASP accepted a submission, for example after a timeout or a lost connection. This section tells you what to do.

There is no retry endpoint. To retry, send the same request again, with the same Idempotency-Key:

  • If Wafeq e-invoicing ASP accepted the first request, it returns the stored response. Wafeq e-invoicing ASP does not submit the document two times.
  • If Wafeq e-invoicing ASP did not accept the first request, it processes the request now.

Do not use a new key to retry. A new key can submit the document a second time. The only exception is idempotency_unconfirmed, below. A key does not expire. A key applies to one taxpayer and to your organization.

Two answers need special care:

  • 409 idempotency_in_progress: the first request with this key is still in progress. Wait, then send the same request again.
  • 409 idempotency_unconfirmed: the first request stopped, and its result is not known. Do not send the same key again, because the answer does not change. Look for the document number in GET /invoices or GET /credit-notes. Filter by the issue date of the document. If the document is there, Wafeq e-invoicing ASP accepted it. Track it. If the document is not there, submit it again with a new key.

If you send the same key with a different body, Wafeq e-invoicing ASP refuses it with 409 idempotency_key_reused. For all other answers, refer to Errors.

Documents in another currency

This section is not a step. It applies when the amounts of the document are not in UAE dirhams (AED).

Example. A company in Dubai exports pump parts to a company in the United States. The invoice is in US dollars. On the issue date, 1 USD is 3.6725 AED.

Send these fields:

  • currency: the ISO 4217 code of the currency, for example USD. The default value is AED.
  • currency_exchange_rate: the number of AED for 1 unit of the currency, for example "3.6725". It must be more than 0, with a maximum of 6 decimal places. Send it as a string, to keep its exact value. Your user decides which rate applies.

Without currency_exchange_rate, Wafeq e-invoicing ASP refuses a document in another currency with 422. On an AED document, Wafeq e-invoicing ASP ignores the rate. Credit notes use the same fields.

Wafeq e-invoicing ASP keeps the amounts of the lines and the totals in the currency of the document. The UAE rules also require the VAT total and the total with VAT in AED. Wafeq e-invoicing ASP adds them: it multiplies each total by the rate, then rounds the result to 2 decimal places, half up. It does not convert each line. For example, 100 USD and 5 USD of VAT at the rate 3.6725 give 18.36 AED of VAT and 385.61 AED in total.

Example:

{
  "invoice_number": "INV-2026-0420",
  "issue_date": "2026-10-16",
  "due_date": "2026-11-15",
  "source_id": "erp-invoice-9420",
  "currency": "USD",
  "currency_exchange_rate": "3.6725",
  "transaction_type_code": "00000001",
  "customer": {
    "name": "Lakeside Pump Supply Inc.",
    "address": { "street": "1200 Harbor Drive", "city": "Houston", "country": "US", "country_subentity": "Texas" }
  },
  "delivery_address": { "street": "1200 Harbor Drive", "city": "Houston", "country": "US", "country_subentity": "Texas" },
  "line_items": [
    { "description": "Hydraulic pump spare parts", "quantity": 4, "unit_price": 750, "tax_category": "Z", "tax_percent": 0 }
  ]
}

Many documents at once

This section is not a step. To submit many documents of one taxpayer at once, for example at the end of the day, send them in a batch of up to 500 documents. Wafeq e-invoicing ASP handles each document of the batch as a submission with Prefer: respond-async, with its own Idempotency-Key. Refer to Send many documents at once.

Documents in Sandbox

In Sandbox, Wafeq e-invoicing ASP does not look for buyers on Peppol, and it delivers nothing. A taxpayer in Sandbox is on Peppol, and a test buyer goes where its TIN says. Wafeq e-invoicing ASP treats any other buyer as not on Peppol, so it reports the document to the FTA only. Test buyers let you see every route. Refer to Test buyers.

Next

Stage 4: Track a document.