API
Navigating the French E-Invoicing mandate: a complete guide to the A-Cube API automation

The shift towards mandatory electronic invoicing and e-reporting in France represents one of the most significant digital transformations for businesses operating within the country. As the ecosystem moves away from unstructured PDFs and paper invoices, it introduces a highly regulated, cooperative architecture designed for real-time compliance and automated document tracking.
As an officially accredited platform (Plateforme Agréée), A-Cube is perfectly positioned to help developers and businesses seamlessly bridge the gap between their software and the French tax authority. In this article, We’ll start with a high-level overview of the French mandate and then dive straight into the technical details of the A-Cube French Invoicing API, covering everything from onboarding a legal entity to managing the full lifecycle of an invoice.
Introduction to the French invoicing API & mandate overview
At the heart of the French e-invoicing mandate lies the 5-Corner Model. Unlike traditional models where a supplier directly emails an invoice to a buyer, the French architecture dictates that the exchange of documents and tax data must route through government-certified platforms called PAs (Plateforme Agréée, working alongside the central public portal (PPF - Portail Public de Facturation).

The flow looks like this:
Corner 1 (Supplier): The business issuing the invoice.
Corner 2 (Sending PA): The supplier’s accredited platform (e.g., A-Cube), which validates the invoice, extracts tax data, and handles routing.
Corner 3 (Receiving PA): The buyer’s accredited platform, which receives the document.
Corner 4 (Buyer): The business receiving the invoice.
Corner 5 (PPF / DGFIP): The central government portal and tax authority that centralizes the directory and monitors the entire lifecycle.
A-Cube automates three core regulatory streams to support this framework:
1. E-Invoicing (Real-Time Dual Transmission): Mandatory for domestic B2B transactions. A-Cube transmits the full invoice to the buyer’s PA while simultaneously sending a tax data subset to the PPF.
2. Document Lifecycle & Statuses: Real-time synchronization of invoice states (e.g., rejected, approved, paid) using standard XML CDAR messages across all corners.
3. E-Reporting: Periodic aggregation and transmission of transaction and payment data for international B2B and B2C sales, which are exempt from real-time e-invoicing.
How to onboard a new legal entity
Before your customers can legally exchange live documents, they must officially declare their designated PA in the government's central directory (the Annuaire). To prevent unauthorized claims on the central registry, the French government requires a formal KYC/KYB (Know Your Customer / Know Your Business) verification process.
A-Cube transforms this normally cumbersome paperwork into a friction-free, two-step API workflow:
Step 1: Create the legal entity
You initialize the company within A-Cube using their 9-digit SIREN number.
This returns a resource object containing the entity's A-Cube uuid and its initial status.
Step 2: Initialize onboarding
Trigger the onboarding session to generate a secure KYC/KYB portal link.
The response includes an onboardingUrl. You simply display this URL in your application’s UI, allowing the end user's legal representative to securely submit their evidence.
Once the user completes the flow, the verification is processed asynchronously. You don't need to poll the API, A-Cube will fire a legal_entity.onboarding Webhook event to your system the moment their status changes to ONBOARDED and the official PA assignment is published to the Annuaire.
The Annuaire: how it works
The Annuaire central is the French government's public registry that maps every company to its chosen receiving platform. Because the government only exposes a manual web interface, A-Cube maintains a synchronized local copy of the entire PPF Annuaire, updated every 24 hours.
Before sending an invoice, you should programmatically search our directory endpoint to find the recipient's electronic routing identifier.
Querying the Annuaire
The response will return a collection of directory entries. For routing purposes, the critical piece of information is found within the networkIdentifiers array (e.g., "value": "0225:123456789"). This is the exact electronic address you will use in your invoice to ensure it reaches the recipient's PA.
Formats and transmission flow
Plain PDFs are a thing of the past. Under the French mandate, all invoices must be exchanged in structured, EN 16931-compliant formats. A-Cube supports the three core formats du socle:
UBL: The ubiquitous Universal Business Language XML.
CII: Cross Industry Invoice XML, optimized for automated validation.
Factur-X: A hybrid 'smart PDF' that embeds a structured XML file within a human-readable PDF/A-3 visual layer.
The Dual Transmission Flow (Outbound): When you submit an invoice, A-Cube triggers Flow 2 to send the complete document to the buyer's PA (Corner 3) via the Peppol network or EDI. In parallel, Flow 1 extracts the mandatory tax data and submits it straight to the PPF (Corner 5).
The Reception Flow (Inbound): When a supplier sends an invoice to your legal entity, A-Cube intercepts the structured file, performs technical validations, stores it, and triggers Flow 6 to synchronize the 'received' status back to the central government.
Sending and receiving an invoice
The A-Cube API embraces an asynchronous, webhook-driven design to handle the complexities of the 5-Corner architecture effortlessly.
Sending an invoice
You submit the structured invoice payload to A-Cube. The system validates the payload synchronously and immediately returns a unique uuid.
Once accepted, the invoice travels asynchronously. As A-Cube communicates with the PPF and the receiving platform, real-time updates are pushed to your application via the invoice.status webhook (e.g., catching technical acceptance or business refusal statuses). You can always fetch full details with a GET /invoices/{uuid} request.
Receiving an invoice
Your system never needs to actively poll for incoming documents. As soon as A-Cube securely catches an inbound invoice and clears it, it dispatches an invoice.inbound.received webhook event containing core metadata (supplier SIRET, amount, currency, and invoice_id).
The invoice lifecycle
In France, the job isn't done when an invoice is delivered. All participating actors must keep the processing status of the document constantly updated through structured XML messages (CDAR format).
The mandate categorizes statuses into two buckets:
Mandatory statuses
These must strictly be transmitted to the public portal (PPF):
200 (Submitted): The initial issuance.
213 (Rejected): Automated technical rejection by a platform due to anomalies.
210 (Refused): A commercial refusal triggered explicitly by the buyer.
212 (Payment received): Strictly mandatory only if the company operates under a cash accounting regime (TVA sur les encaissements).
Optional statuses
Highly recommended to improve automation and B2B communication:
204 (In hand): The document is being processed.
205 (Approved) / 206 (Partially approved)The recipient accepts the invoice in its entirety.
207 (In dispute) / 208 (Suspended)The recipient disagrees with all or part of the invoice.
Submitting a lifecycle state
As a receiver, you are legally obligated to report mandatory business statuses (like Refused or Payment received). To trigger an update, simply hit the lifecycle endpoint:
A-Cube translates this into a compliant CDAR message and propagates it to the supplier's PA and the central government, keeping all five corners in perfect synchronization. For specific cases you must send further information as described in the documentation here: https://docs.acubeapi.com/documentation/gov-fr/invoices/lifecycle#send-status-change
Conclusion
The French e-invoicing mandate introduces strict operational requirements, but complying with them shouldn't mean rebuilding your software from scratch. A-Cube abstracts away the intricate 5-Corner Model, the complexities of real-time PPF routing, and the technical hurdles of CDAR lifecycle statuses.
With native APIs for entity onboarding, real-time Annuaire lookups, dual transmission handling, and extensive webhook orchestration, developers can build a fully compliant, future-proof French billing workflow with maximum efficiency.

