1) Install the PDF Invoice plugin, version 5.2.1 or later, turn Factur-X on in its settings, and fill your company's details in it: company name, SIREN, VAT number, address and the three legal mentions French law requires on every invoice. If some of your business customers have no VAT number, add a SIREN field to the addresses and choose it in its "SIREN field of the customer" setting.
2) In Pennylane, open Settings, Connectivity, Developers, and generate an API token with read and write access to Customer invoices and Customers. Pennylane offers it from its Essentiel plan, to the company's administrator or director: if the Developers page is missing, your plan has no API (the Collaboratif plan an accountant offers has none).
3) Install this plugin, enable it in Extensions > Plugins, and paste the token in its settings.
4) In HikaShop, go to System > Order statuses and tick, in the "Pennylane" column, the statuses that send the invoice.
5) Set up the HikaShop cron, so that what could not be sent is tried again.
Configuration
Pennylane API token: the token of step 2. To try the plugin first, make the token in your Pennylane sandbox (your profile, Test environment): it then sends to the sandbox.
Send to the e-invoicing network: have Pennylane send the invoices of your French business customers over the network. Leave it on: the reform requires it.
Mark the invoices as paid: marks the invoice as paid in Pennylane when the order is paid and Pennylane cannot match the payment itself (PayPal, cheque...). The payment methods listed in the PDF Invoice plugin's "Payment methods paid after the invoice" setting are left unpaid. Stripe and bank transfer orders are never marked: Pennylane matches them with the money it receives.
Revenue account of the products: the number of the ledger account your product sales go to, for instance 707. Empty, Pennylane chooses.
Send the orders invoiced since: also sends the orders invoiced since this date that are not in Pennylane yet, twenty at each run of the cron.
Debug mode: writes every call to Pennylane to the HikaShop log file.
Troubleshooting
The last error of an order is shown on its page in the backend, and written to the HikaShop log file. Your API token is never written to the log.
"The PDF Invoice plugin did not give the Factur-X file": install or update the PDF Invoice plugin (5.2.1 or later) and turn Factur-X on in its settings.
An invoice to a foreign company, or to a private customer, is "not for the network": it is in Pennylane, and in its e-reporting, as the reform wants.
Imported invoices wait in Pennylane's inbox for your accountant to check them, as any invoice imported into Pennylane does.