This repository provides an ERPNext / Frappe-based implementation for UAE E‑Invoicing, aligned with the upcoming UAE Federal Tax Authority (FTA) e‑invoicing framework and UBL 2.1 standards.
The solution focuses on:
Generating UAE‑compliant invoice data (UBL XML‑ready)
Enforcing VAT, HS/SAC, and legal validation rules
Preparing invoices for future FTA clearance & reporting workflows
✅ Sales Invoice & Credit Note support
✅ VAT category & tax breakdown handling
✅ HS Code (Goods) & SAC Code (Services) validation
✅ Invoice Transaction Type Codes (Standard, Credit, Debit, Deemed Supply, etc.)
✅ Payment Means Codes (Cash, Card, Bank Transfer, etc.)
✅ Legal Entity & Registration Identifier handling
✅ Customer & Supplier identification blocks
✅ Structured JSON → XML mapping (UBL 2.1 compatible)
✅ Designed for ERPNext v16+
- 380 – Commercial Invoice
- 480 – Out of Scope Invoice
- 381 – Credit Note (Taxable)
- 81 – Credit Note (Out of Scope)
- 389 – Self-Billed Invoice
- 361 – Self-Billed Credit Note
✔ Quantity must be greater than zero
✔ Mandatory tax category present
✔ Correct invoice reference for Credit Notes
✔ Legal identifiers validated before submission
✔ Decimal precision handled using ROUND_HALF_UP
bench get-app uae_erpgulf https://github.com/your-org/uae_erpgulf.git bench --site yoursite.local install-app uae_erpgulf
Go to:
Company → UAE E-Invoicing
Enable: ☑ UAE E-Invoice Enabled
Provide the following:
- Base URL
- Participant ID
- X-Flick-Auth-Key
- Verify Token
- Generate OAuth2 Access Token
- Store and reuse token until expiry
- Retrieves VAT/TRN and business details
- Ensures proper registration
- User creates Sales Invoice
- System validates configuration
- Invoice payload is generated
- Authentication using OAuth2
- Invoice sent to API (Flick)
- Forwarded to FTA
- Response stored in ERPNext
The system listens for:
- Invoice Submitted
- Invoice Validated
- Invoice Accepted
- Invoice Rejected
- Invoice Delivered
- ERPNext / Frappe
- REST APIs
- OAuth2 Authentication
- Webhooks
✅ Structured Invoice JSON
- Ensure VAT and TRN details are correct
- Follow structured format strictly
- Keep API credentials secure
- Improved VAT compliance
- Reduced manual work
- Faster invoice processing
- Better accuracy & transparency
UAE Federal Tax Authority (FTA)
UBL 2.1 Specification
PEPPOL BIS Billing 3.0