Overview
This guide describes how to connect Oracle — NetSuite, Fusion Cloud ERP, E-Business Suite and JD Edwards — to TrustBill, a UAE FTA-accredited service provider (ASP). Invoices posted in Oracle are submitted as PINT-AE compliant e-invoices to the FTA without replacing your ERP.
Oracle already manages UAE tax, customer master data, AR invoices, procurement and general ledger. What it does not ship natively is PINT-AE XML generation and delivery through an FTA-accredited ASP over the Peppol network. TrustBill is the connecting layer.
What this integration delivers
- Submit AR invoices and credit memos from Oracle to the FTA
- NetSuite SuiteScript and RESTlets for real-time submission
- Fusion Cloud ERP via REST / SOAP and Oracle Integration Cloud
- Oracle EBS via middleware / SOA Suite / concurrent program
- JD Edwards via Orchestrator and AIS
- PINT-AE XML generated, validated and delivered by TrustBill
- FTA acknowledgement, UUID and QR written back to Oracle custom fields
- Bulk migration path for historical invoices via CSV
What is Oracle?
Oracle is a global enterprise software vendor. The Oracle products used by UAE businesses for e-invoicing are:
- Oracle NetSuite — cloud ERP with SuiteScript, RESTlets and SuiteTalk SOAP
- Oracle Fusion Cloud ERP — SaaS enterprise ERP with REST / SOAP and Oracle Integration Cloud
- Oracle E-Business Suite (EBS) — on-premise ERP with SOA Suite, PL/SQL and BI Publisher
- Oracle JD Edwards — enterprise ERP with Orchestrator, AIS and real-time events
Supported Versions
| Product | Supported Versions | Primary API |
|---|---|---|
| Oracle NetSuite | 2022.2, 2023.x, 2024.x, 2025.x | SuiteScript 2.x, RESTlets, SuiteTalk |
| Oracle Fusion Cloud ERP | 23A – 25B and later | REST / SOAP, OIC |
| Oracle EBS | 12.2.x (12.2.10, 12.2.11, 12.2.12) | SOA Suite, PL/SQL, BI Publisher |
| Oracle JD Edwards | 9.2 with Tools 9.2.6+ | Orchestrator, AIS, BSSV |
Prerequisites
- Oracle system with UAE legal entity, TRN and customer tax IDs configured
- Customer records with 15-digit UAE TRN for B2B invoices
- User / service account with permission to read AR invoices and customers
- Active TrustBill SME account with API credentials
- Network egress from Oracle host / middleware to TrustBill API endpoints
- For NetSuite: a custom field or custom record to store TrustBill status
Integration Architecture
Oracle stays the source of record. Invoices flow to TrustBill through SuiteScript, RESTlet, OIC integration, middleware or scheduled extract.
- Invoice created / posted in Oracle.
- Connector / script / middleware reads the invoice and transforms it to TrustBill's PINT-AE JSON.
- POST to TrustBill
/api/v1/invoiceswith API key authentication. - TrustBill validates, renders PINT-AE XML and delivers over Peppol.
- Acknowledgement written back to Oracle custom fields or status tables.
Connection Methods
1. Oracle NetSuite SuiteScript (Recommended for NetSuite)
Use a SuiteScript 2.x User Event Script on the Invoice record to call TrustBill via https after submit.
2. Oracle NetSuite RESTlet
Expose a custom RESTlet to list posted invoices and receive TrustBill status updates from an external middleware.
3. Oracle Integration Cloud (OIC) for Fusion
Build an OIC integration that polls the Fusion Receivables REST API and pushes to TrustBill.
4. Oracle EBS Middleware / SOA Suite
Use SOA Suite, a BPEL process or a custom concurrent program to extract AR invoices and send them to TrustBill.
5. JD Edwards Orchestrator / AIS
Use the Orchestrator to expose invoice data and call the TrustBill API, or use BSSV real-time events.
6. CSV / FBDI / BI Publisher Extract
For controlled migrations, export invoice data via BI Publisher or FBDI and upload to TrustBill bulk import.
Authentication
TrustBill API uses Bearer tokens. Oracle product authentication depends on the platform.
POST https://trustbill.ae/api/v1/invoices
Authorization: Bearer tb_your_api_key_here
Content-Type: application/jsonOracle product auth:
- NetSuite: Token-Based Authentication (TBA) or OAuth 2.0 for RESTlets / SuiteTalk
- Fusion: OAuth 2.0 client credentials or Basic Auth over TLS for the FSCM REST API
- EBS: SOA Suite user / FND user with AR responsibilities
- JD Edwards: AIS token or BSSV security (JAS user)
Oracle NetSuite
The standard NetSuite approach is a SuiteScript 2.x User Event Script attached to the Invoice record's afterSubmit event.
/**
* @NApiVersion 2.x
* @NScriptType UserEventScript
*/
define(['N/record', 'N/https', 'N/log'], function(record, https, log) {
function afterSubmit(context) {
if (context.type !== context.UserEventType.CREATE &&
context.type !== context.UserEventType.EDIT) return;
var inv = context.newRecord;
var payload = {
invoiceNumber: inv.getValue('tranid'),
issueDate: inv.getValue('trandate'),
dueDate: inv.getValue('duedate') || inv.getValue('trandate'),
currency: inv.getText('currency'),
seller: { trn: '123456789100003', legalName: 'Your Company LLC' },
buyer: { trn: inv.getValue('custbody_uae_trn'), legalName: inv.getValue('entityname') },
items: [],
totals: {
netAmount: Number(inv.getValue('subtotal')),
taxAmount: Number(inv.getValue('taxtotal')),
grossAmount: Number(inv.getValue('total'))
}
};
var resp = https.post({
url: 'https://trustbill.ae/api/v1/invoices',
headers: { Authorization: 'Bearer tb_your_api_key', 'Content-Type': 'application/json' },
body: JSON.stringify(payload)
});
log.debug('TrustBill response', resp.body);
}
return { afterSubmit: afterSubmit };
});Add a custom body field custbody_uae_trn on the Customer and custbody_tb_status on the Invoice to store the FTA status.
Oracle Fusion Cloud ERP
For Fusion, query the Receivables REST endpoint and forward to TrustBill. The OIC integration can be scheduled or event driven.
GET https://{instance}.oraclecloud.com/fscmRestApi/resources/11.13.18.05/receivableInvoices
?q=BusinessUnitId=300000001234567&onlyData=true&expand=InvoiceDff
Authorization: Basic {base64(user:pass)}Map the Fusion invoice lines to TrustBill items, and use the customer account's TaxRegistrationNumber as the buyer TRN.
Oracle E-Business Suite
EBS can export AR invoices via a concurrent program that writes a CSV/JSON file, or through a SOA Suite BPEL service that calls the TrustBill API.
BEGIN
FOR rec IN (
SELECT customer_trx_id, trx_number, trx_date, bill_to_customer_id
FROM ra_customer_trx_all
WHERE org_id = :p_org_id
AND creation_date >= TRUNC(SYSDATE)
) LOOP
-- call TrustBill middleware
NULL;
END LOOP;
END;Oracle JD Edwards
Use the Orchestrator to create a service request that exposes the F03B11 / F03B13 invoice tables, then call TrustBill from a connector step.
POST https://{jde-ais-server}/jderest/v2/ubs/TrustBillInvoicePush
Authorization: Bearer {jde_token}
Content-Type: application/json
{
"doco": "123456",
"dcto": "RI",
"kco": "00001",
"an8": "1234"
}Oracle → TrustBill Field Mapping
| Oracle Field | TrustBill JSON | Notes |
|---|---|---|
Invoice Number / trx_number | invoiceNumber | Unique per seller |
Invoice Date / trandate | issueDate | ISO-8601 |
Company / Legal Entity TRN | seller.trn | 15-digit UAE TRN |
Customer TRN / Tax Registration | buyer.trn | Required for B2B |
Item Description | items[].name | English + Arabic if available |
Quantity | items[].quantity | Positive numeric |
Unit Price | items[].unitPrice | After line discount |
Total Amount | totals.grossAmount | VAT inclusive |
UAE VAT / Tax Mapping
Map Oracle tax codes / tax groups to FTA tax category codes.
| Oracle Tax Code | TrustBill taxCategory | Rate |
|---|---|---|
| UAE VAT 5% | STANDARD | 5% |
| UAE VAT 0% | ZERO_RATE | 0% |
| Exempt | EXEMPT | — |
| Reverse Charge | REVERSE_CHARGE | 5% |
| Out of Scope | OUT_OF_SCOPE | — |
Credit Notes
Oracle credit memos are mapped to the TrustBill credit-note endpoint. Include the original invoice number.
POST https://trustbill.ae/api/v1/credit-notes
{
"originalInvoiceNumber": "INV-00001",
"issueDate": "2026-09-08",
"creditNoteNumber": "CM-00001",
"reason": "Goods return",
"totals": {
"grossAmount": -525.00
}
}Status Tracking
TrustBill posts status updates to a webhook URL. The middleware or script writes the values back to Oracle custom fields.
POST https://your-middleware.example.com/webhook/trustbill
Content-Type: application/json
{
"invoiceNumber": "INV-00001",
"status": "Acknowledged",
"ackRef": "FDA-ACK-123456789",
"uuid": "a1b2c3d4-...",
"reason": null
}Bulk Migration
Use BI Publisher, SQL extraction or FBDI export to build a CSV and upload to TrustBill's bulk import.
POST https://trustbill.ae/api/v1/invoices/bulk
Authorization: Bearer tb_your_api_key
Content-Type: multipart/form-data
file: oracle_invoices.csv
options: {"mode":"sandbox","skipErrors":true}Sandbox & Live Modes
Test the full flow without touching the FTA. Switch to live once FTA registration and ASP assignment are complete.
| Mode | Endpoint / Option | What it does |
|---|---|---|
| Sandbox | ?mode=sandbox or bulk import sandbox | Validates PINT-AE, no FTA delivery |
| Live | ?mode=live | Submits to FTA via ASP over Peppol |
Multi-Entity & Multi-Currency
NetSuite subsidiaries, Fusion business units, EBS operating units and JD Edwards company codes all let a single UAE group run several legal entities — for example a mainland trading company and a free-zone company. TrustBill treats each as an independent seller with its own TRN.
Entity → TrustBill profile mapping
Maintain a lookup table that maps each NetSuite subsidiary ID, Fusion business unit, EBS operating unit or JD Edwards company code to a TrustBill API key and TRN. Route every invoice through the matching profile — never share one TrustBill profile across two legal entities.
Multi-currency invoices
Oracle products store the transaction currency separately from the entity's functional currency. When the invoice currency is not AED, send both the trade-currency amount and the AED-converted total (using the exchange rate on the transaction) so the PINT-AE document always carries an AED value.
Intercompany billing
Intercompany invoices between two UAE subsidiaries or operating units under the same parent still need two separate PINT-AE submissions — one from the selling entity, one recorded on the buying entity's books. Do not collapse them into a single TrustBill call.
Error Handling & API Errors
Handle every non-2xx TrustBill response deterministically inside the SuiteScript, OIC integration, SOA process or Orchestrator — separate retryable errors from permanent validation errors.
| HTTP Status | Meaning | Action |
|---|---|---|
| 400 | Malformed JSON or missing required field | Fix the mapping; do not retry unchanged |
| 401 | Invalid or expired API key / OAuth token | Rotate the key or refresh the OAuth token |
| 403 | TRN on invoice does not match the API key's registered TRN | Fix entity → TRN mapping |
| 409 | Duplicate invoice number for this seller | Check idempotency key / document number reuse |
| 422 | PINT-AE validation failure (tax, TRN format, totals mismatch) | Inspect errors[] array; fix mapping |
| 429 / 5xx | Rate limited or TrustBill/FTA temporarily unavailable | Retry with exponential backoff (max ~5 attempts) |
Setup Checklist
- UAE TRN configured for every subsidiary / business unit / operating unit / company code
- Customer records populated with TRNs for B2B customers
- SuiteScript / REST / SOAP / OIC / Orchestrator access enabled and least-privilege roles assigned
- Entity → TrustBill API key mapping table created
- Tax code → PINT-AE tax category mapping reviewed with finance
- Credit memo flow mapped to TrustBill credit notes
- Webhook or polling job configured for status write-back
- Sandbox invoices tested for standard, zero-rated, exempt and reverse-charge cases
- Bulk migration CSV template validated against historical AR data
- Go-live date agreed and live mode switched only after sandbox sign-off
Troubleshooting
- 422 validation error: Confirm the customer TRN is 15 digits and the company TRN is set.
- NetSuite SSL error: Ensure the TrustBill certificate is trusted; the domain uses TLS 1.3.
- Fusion 401: Refresh the OAuth token before expiry and confirm the user has the AR Inquiry duty role.
- EBS extract not running: Check the concurrent program completes with no data errors and the output is accessible to the middleware.
- Missing Arabic names: Use a DFF or custom field to store Arabic legal names and include it in the mapping.
Support
Need help with the Oracle integration? Our team can review your NetSuite SuiteScript, Fusion OIC integration, EBS PL/SQL or JD Edwards Orchestrator setup.