Example: A SaaS platform automatically generates a Qonto invoice at the end of each billing period and sends the Factur-X PDF to the customer, with no manual step required.Prerequisites:
- E-invoicing must be enabled on your Qonto account.
- Scopes:
client.read,client.write,client_invoice.read,client_invoice.write,attachment.read,organization.read(optional).
Find or create the client
Look up an existing client by email or create a new one. Save the
client_id — you’ll need it in the next step.Endpoint: List clients · Create a clientOAuth scopes required:
client.read, client.write- Python
- Node.js
Get your receiving bank account IBAN
The invoice must reference the Qonto bank account where you want to receive payment. Fetch your organization to retrieve the IBAN of the account you’ll use.Endpoint: Retrieve the authenticated organization and list bank accounts
OAuth scope required:
organization.readThis step is optional if you already know the IBAN of the account you want to use.
- Python
- Node.js
Create the invoice draft
Create the invoice in draft state. It will not yet be sent or assigned a number.Endpoint: Create a client invoice
OAuth scope required:
client_invoice.write- Python
- Node.js
Finalize the invoice
Finalizing the invoice assigns it an official number, locks it for editing, and triggers the asynchronous generation of the Factur-X PDF.Endpoint: Finalize a client invoice
OAuth scope required:
client_invoice.write- Python
- Node.js
Poll until the Factur-X PDF is ready
The Factur-X PDF is generated asynchronously after finalization. The
attachment_id may not be set immediately on the invoice — re-fetch the invoice until it appears, then poll GET /attachments/{id} until it returns 200. That is your signal to download.Endpoints: Retrieve a client invoice · Retrieve an attachmentOAuth scope required:
client_invoice.read, attachment.read- Python
- Node.js
We now have the finalized Factur-X PDF downloaded locally. It contains the embedded
factur-x.xml file required for electronic invoicing compliance.