PL/FACTUR — E-invoicing for Oracle PL/SQL

Create, import and validate Factur-X / ZUGFeRD, XRechnung and Peppol invoice data directly inside Oracle Database. Generate CII or UBL XML, or package supported CII invoices with an existing PDF/A-3 document.

E-invoicing where your Oracle data already lives

PL/FACTUR brings structured e-invoicing into your existing Oracle workflows. Build invoice data, import CII or UBL documents, validate business rules and create XML or hybrid PDF output through one PL/SQL API.

Pure PL/SQL API

Create and process electronic invoice data directly from Oracle applications without introducing a separate application-tier invoice engine.

CII and UBL XML

Import and export CII and UBL 2.1 Invoice / CreditNote XML using the same invoice model. Select Factur-X, EN 16931 UBL, XRechnung or Peppol profiles to match your workflow.

Validation built in

Check the invoice model against the selected profile, supported business rules, arithmetic and code lists. Stop at the first error or collect a structured report with errors, warnings and information.

Factur-X, XRechnung and Peppol from one API

Choose the format and profile required by your recipient. Factur-X / ZUGFeRD uses CII XML and supports the five profiles below, from reduced invoice data to extended business information.

MINIMUM

Core invoice information for reduced structured-data requirements.

BASIC WL

Basic invoice information without structured line-item serialization.

BASIC

Structured invoice data including invoice line information.

EN 16931

The EN 16931 CII profile for Factur-X and the default PL/FACTUR profile.

EXTENDED

Expanded business information for more complex invoicing scenarios.

Alongside Factur-X, select standalone EN 16931 UBL, XRechnung CII / UBL, or Peppol BIS Billing profiles.

EN 16931 UBL

Generate and import UBL 2.1 Invoice and CreditNote XML using the general EN 16931 profile, independently of a country-specific CIUS.

XRechnung

Work with XRechnung 3.0.2 in CII or UBL syntax. Use standalone XML, with an optional PDF/A-3 reference carrier for XRechnung CII.

Peppol BIS Billing

Generate and import Peppol BIS Billing 3.0.21 UBL invoices and credit notes, including billing Profile 01 and billing-with-response Profile 02.

Factur-X baseline: 1.09.2 / ZUGFeRD 2.5.2. UBL workflows produce XML only. Peppol support covers invoice XML; access-point delivery and response-message handling are separate integrations.

Start with invoice data or existing XML

Create invoices from application data or import supported CII and UBL documents. Both workflows use the same public PL_FACTUR API and canonical model.

Data-first workflow

Select a profile, populate the model from your Oracle application and retrieve CII or UBL XML. GetXML validates the model before returning the invoice. Use a Factur-X CII profile when you need hybrid PDF output.

-- Workflow outline: supply your invoice fields.
pl_factur.Init(
  pl_factur.c_profile_en16931_ubl
);

pl_factur.SetInvoice(...);
pl_factur.SetSeller(...);
pl_factur.SetBuyer(...);
pl_factur.AddLine(...);
pl_factur.AddVatBreakdown(...);
pl_factur.SetTotals(...);

l_xml := pl_factur.GetXML;
-- Use l_xml, then free the temporary CLOB.

XML-first workflow

Import supported CII or UBL Invoice / CreditNote XML. LoadXML detects the profile, validates the document and replaces the active model only after success. Inspect the imported data or modify it and export XML again.

-- Supported CII or UBL XML as a UTF-8 BLOB.
pl_factur.LoadXML(l_invoice_xml_blob);

l_invoice := pl_factur.GetInvoice;
l_seller  := pl_factur.GetSeller;

-- Existing state is preserved if import fails.
-- Successful model changes trigger serialization.
l_xml := pl_factur.GetXML;
-- Use l_xml, then free the temporary CLOB.

Unchanged XML-first CII imports can be embedded with their exact original bytes, including a UTF-8 BOM. After a successful data-first change, PL/FACTUR serializes the updated model. Unmodified UBL imports retain their source XML for export.

One canonical invoice model

Use one canonical invoice model for validation, CII / UBL serialization, supported CII PDF packaging and read-only inspection. Model parties, delivery, payments, line details, tax and supporting documents without maintaining a separate structure for each XML syntax.

Invoice parties

  • Seller and buyer identity, including multiple seller IDs
  • Payee and seller tax representative
  • Postal addresses and contact details
  • VAT and registration identifiers
  • Electronic addresses and identifier schemes

Business data

  • Invoice and credit-note types
  • Order, contract, project and preceding-invoice references
  • Delivery and invoicing periods
  • Payment accounts and payment terms
  • Invoice and line notes
  • Supporting-document URIs and embedded binary attachments

Lines, amounts and tax

  • Invoice lines, prices and price-base quantities
  • Line classifications, attributes and object references
  • Document and line allowances and charges
  • VAT categories, exemptions and tax-point information
  • VAT breakdowns and invoice totals
  • Paid and due amounts

Validation results your application can use

Use Validate for a fail-fast check or ValidateReport to collect eligible issues in one result. Each issue carries a rule code, severity, business-term reference, model field path and message. Warnings and information remain distinct from errors.

l_report := pl_factur.ValidateReport;

for i in 1 .. l_report.issue_count loop
  dbms_output.put_line(
    l_report.issues(i).severity || ' ' ||
    l_report.issues(i).code || ': ' ||
    l_report.issues(i).message
  );
end loop;

A JSON report is also available through GetValidationReportJSON for SQL, JDBC and service integrations. Validation and read-only inspection preserve the current invoice model and the retained XML source.

Create hybrid invoices from an existing PDF/A-3 document

Keep the invoice layout your application already produces. PL/FACTUR accepts an independently valid PDF/A-3a, PDF/A-3b or PDF/A-3u carrier, adds the invoice XML and required metadata, and preserves the supported input conformance level.

Preserve the visible invoice

The supplied PDF remains the base document. Existing pages, visible invoice content and existing PDF/A metadata are preserved.

Embed factur-x.xml

Factur-X profiles embed CII XML as factur-x.xml, with the profile-specific associated-file relationship and Factur-X XMP metadata.

Incremental PDF update

Carrier preparation uses an incremental PDF update rather than regenerating the visible invoice pages.

pl_factur.PreparePDFCarrier(
  p_pdf     => l_pdfa3_invoice,
  p_result  => l_facturx_pdf,
  p_moddate => sysdate
);

XRechnung CII reference PDF

For the XRechnung CII profile, embed xrechnung.xml in a matching PDF/A-3 reference document using the dedicated entry point below. The XML is authoritative. Send standalone XML whenever the recipient or portal requires it; UBL profiles remain XML-only.

-- Active profile: c_profile_xrechnung_cii
pl_factur.PrepareXRechnungReferenceCarrier(
  p_pdf     => l_matching_pdfa3,
  p_result  => l_reference_pdf,
  p_moddate => sysdate
);

Package first. Sign the completed invoice afterwards.

CII carrier preparation adds XMP metadata and embedded invoice XML to the PDF. Apply the final PDF digital signature after PL/FACTUR has created the completed document.

Use PL/SIGN to add a PDF digital signature directly from Oracle PL/SQL after the invoice packaging stage.

Invoice processing and visual PDF responsibilities

PL/FACTUR handles

  • Canonical invoice data and read-only model getters
  • Supported CII and UBL XML import / export
  • Factur-X, EN 16931 UBL, XRechnung and Peppol profiles
  • Supported business rules, arithmetic and code lists
  • Structured validation reports for applications
  • Supporting documents and XML-embedded attachments
  • Factur-X hybrid PDF packaging
  • XRechnung CII reference-PDF packaging

The application supplies

  • Invoice data from your business system
  • The visible invoice layout and pages, when using a PDF carrier
  • An independently valid PDF/A-3a, 3b or 3u carrier
  • Required embedded fonts, output intent and ICC data
  • Final XML-profile and PDF/A acceptance checks
  • Delivery to the recipient, portal or Peppol access point

PL/FACTUR checks the supported carrier contract and adds the invoice payload; it does not render invoice pages or convert an arbitrary PDF to PDF/A. The visible PDF must match the XML. Validate final documents with the applicable XML-profile and PDF/A tools.

Built for Oracle business applications

Integrate structured e-invoicing into the same PL/SQL workflows that already manage your customers, orders, invoice data and PDF documents.

Oracle ERP applications

Create structured invoice data directly from existing Oracle business tables and PL/SQL processes.

Oracle APEX

Add Factur-X, XRechnung and Peppol invoice XML processing to APEX applications whose business logic already runs in Oracle Database.

Invoice integration

Import supported CII / UBL XML, inspect the model and generate invoice output for your recipient. Package CII invoices with a matching PDF/A-3 where the workflow supports it.

Try PL/FACTUR

Evaluate CII / UBL invoice processing and Factur-X PDF packaging in Oracle PL/SQL. Explore the demo examples or contact us to try PL/FACTUR in your Oracle environment.

PLslash
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.