
ERPNext Integration
ERPNext UAE E-Invoicing β FTA PINT-AE Integration 2026
TrustBill turns ERPNext into a UAE e-invoicing powerhouse. Keep your open-source ERP on self-hosted or Frappe Cloud β we generate PINT-AE XML, validate it against FTA rules, and submit through an accredited ASP.
How TrustBill integrates with ERPNext
ERPNext is an open-source ERP used by UAE manufacturers, trading houses, service firms and free-zone companies. It stores your customers, items, VAT, sales invoices and payments in one place, but it is not a Peppol/FTA-accredited e-invoicing solution on its own. TrustBill adds the missing compliance layer: a secure API connection reads invoice data from ERPNext, converts it to PINT-AE XML, validates the UAE mandatory fields, and routes the document to your buyer through an Accredited Service Provider (ASP).
One-time setup guide
Connecting ERPNext to TrustBill is straightforward and does not require core ERPNext code changes:
1. **Create your TrustBill account** β Sign up for free and enter your TRN and business details. 2. **Connect ERPNext** β Add an API key and site URL for your ERPNext instance (self-hosted or Frappe Cloud). 3. **Map master data** β TrustBill imports customers, items, tax templates and chart of accounts, and maps them to PINT-AE fields. 4. **Configure UAE rules** β Set VAT codes, free-zone flags, place of supply and invoice type codes. 5. **Send a test invoice** β Submit a test sales invoice to the Peppol network and confirm delivery status.
After go-live, every submitted ERPNext invoice is converted and transmitted automatically.
PINT-AE compliance for ERPNext invoices
The UAE Ministry of Finance requires PINT-AE structured XML for B2B and B2G e-invoices. TrustBill takes the native invoice data from ERPNext and builds a PINT-AE document that covers the mandatory and conditional fields: UUID, issue date and time, supplier/buyer TRN, legal names in English, line-item descriptions, unit prices, VAT rates, total with VAT and UAE-specific elements such as free-zone and margin-scheme indicators. Large businesses (revenue β₯ AED 50M) go live on 1 January 2027; SMEs follow on 1 July 2027.
ERPNext field β PINT-AE mapping
The exact mapping TrustBill applies when converting an ERPNext Sales Invoice DocType (read via the Frappe REST API or an on_submit Server Script webhook) to PINT-AE XML. Field names below are the Frappe DocField IDs; Custom Fields you add follow the same conventions. Bookmark this table before configuring your ERPNext tax templates and customer masters.
| ERPNext DocField | PINT-AE / UBL 2.1 field | Note |
|---|---|---|
| Sales Invoice.name | cbc:ID | ERPNext invoice ID (naming series). Must be unique across all submissions. |
| Sales Invoice.posting_date | cbc:IssueDate | ISO date. Must not be in the future. |
| Customer.tax_id | cac:AccountingCustomerParty/cac:PartyTaxScheme/cbc:CompanyID | Buyer TRN β 15 digits. Set on the Customer DocType. |
| Company.tax_id | cac:AccountingSupplierParty/cac:PartyTaxScheme/cbc:CompanyID | Your TRN. Set once on the Company DocType. |
| Sales Invoice Item.description / item_name | cac:InvoiceLine/cbc:Description or cac:Item/cbc:Name | Line-item text. UTF-8; Arabic supported. |
| Sales Invoice Item.qty Γ rate | cbc:LineExtensionAmount, cbc:BaseQuantity, cac:Price/cbc:PriceAmount | PINT-AE reconstructs the line total from qty Γ rate. |
| Sales Taxes and Charges.account_head / rate | cac:ClassifiedTaxCategory (S=5%, Z=0%, E=exempt, O=out-of-scope) | ERPNext tax head must map to a PINT-AE category via TrustBill Tax Mapping. |
| Sales Invoice.currency | cbc:DocumentCurrencyCode | AED for domestic; non-AED needs conversion_rate to be populated. |
| Sales Invoice.grand_total | cac:LegalMonetaryTotal/cbc:PayableAmount | Reconciled against line totals + tax; mismatch = validation failure. |
| Customer.custom_free_zone (Custom Field) | Extension namespace flag; VAT category derived | Add the Custom Field to the Customer DocType once. |
| Sales Invoice.remarks / custom_advance_uuid | cac:DocumentReference for advance-payment linking (type 386) | Populate on any invoice that recovers a prior advance. |
| Sales Invoice.return_against (credit note) | cbc:InvoiceTypeCode="381"; cac:BillingReference/cac:InvoiceDocumentReference | Use ERPNext's Return / Credit Note flow β do not create as a standalone Sales Invoice. |
Common ERPNext β PINT-AE validation errors
The eight most-hit validation errors when an ERPNext invoice fails PINT-AE checks, and exactly what to fix in ERPNext to clear each one. TrustBill's dashboard surfaces these codes with plain-English explanations; the table below is the reference version.
| Error code | Meaning | Fix in ERPNext v14+ / Frappe |
|---|---|---|
| PAE-BR-01 | Buyer TRN missing or malformed. | ERPNext β Customer β edit β set Tax ID to the 15-digit TRN. Ensure the Tax Category is UAE. |
| PAE-BR-04 | Seller TRN missing. | ERPNext β Company β edit β set Tax ID. |
| PAE-BR-11 | Line-total mismatch (qty Γ rate β line total). | In the Sales Invoice, edit the item row and correct rounding on Qty or Rate so amount reconciles. Check Currency Exchange settings if issue recurs. |
| PAE-BR-12 | ERPNext tax head not mapped to a PINT-AE category. | TrustBill β Settings β Tax Mapping. Map each Sales Taxes and Charges Template row to a PINT-AE category (S / Z / E / O). |
| PAE-BR-14 | Currency is not AED and no FX rate reference supplied. | In the Sales Invoice header, ensure Currency and Exchange Rate (conversion_rate) are both populated before submitting. |
| PAE-BR-21 | Credit note lacks a valid parent invoice reference. | In ERPNext, open the source invoice β click Return / Credit Note. This populates return_against automatically; do not create a standalone Sales Invoice. |
| PAE-BR-22 | Advance-payment invoice not linked to its recovery. | Add a Custom Field custom_advance_uuid on Sales Invoice; populate it on the recovery invoice with the advance-invoice UUID before submission. |
| PAE-BR-31 | Free-zone flag set but supply-place code not present. | In the Customer form, set the custom_free_zone Custom Field and ensure the primary Address is in the free zone. |
Key features for ERPNext users
TrustBill's ERPNext integration includes:
- **API-based sync** β Uses the standard ERPNext REST API; no on-premise agent required. - **Self-hosted and Frappe Cloud** β Works with both deployment models. - **PINT-AE generation** β Native ERPNext invoices become UAE-standard XML. - **Real-time validation** β Errors are returned before submission with field-level guidance. - **Status tracking** β Track pending, submitted, accepted and rejected invoices in one dashboard. - **Credit notes and self-billing** β Supports PINT-AE credit notes and self-billed document types. - **VAT 201 integration** β Submitted e-invoices feed your VAT 201 return draft. - **Data residency** β Invoice data is processed and stored in the UAE.
Security and data ownership
You keep full ownership of your ERPNext database. TrustBill reads only the invoice and master data needed for e-invoicing and does not write back into your ERPNext ledger. All API calls use TLS 1.3, credentials are encrypted at rest, and you can rotate or revoke the API key at any time. For self-hosted deployments, the connection leaves from your own infrastructure, so sensitive financial data never has to be copied to a third-party server manually.
Frequently Asked Questions
Is ERPNext compliant with UAE e-invoicing?
ERPNext is not Peppol or FTA-certified by itself. With a connector like TrustBill, it can produce PINT-AE structured XML, but the actual network transmission must go through a UAE Accredited Service Provider (ASP).
Does the integration work for self-hosted and Frappe Cloud ERPNext?
Yes. TrustBill connects to both self-hosted ERPNext instances and Frappe Cloud sites through the standard REST API, as long as the endpoint is reachable over HTTPS.
How long does ERPNext e-invoicing setup take?
A standard ERPNext implementation with clean master data can be connected within a few hours. Heavily customised setups with custom doctypes or scripted workflows usually need one to two days of mapping and testing.
Is ERPNext suitable for UAE free-zone companies?
Yes. ERPNext is popular with free-zone SMEs. TrustBill handles mainland and free-zone invoice scenarios, including free-zone flags, TRN validation, and VAT treatment rules required by the FTA.
How is my ERPNext data kept secure?
TrustBill uses a read-only API connection, TLS 1.3 encryption in transit, encrypted storage for credentials, and never modifies your ERPNext ledger. You control the API key and can revoke access at any time.