Skip to main content

EMPayment — CODA Import and SEPA QR Code for Dolibarr

EMPayment is a Dolibarr module covering two complementary needs: automating bank reconciliation via CODA import (Belgian .cod files and Codabox API, plus a CSV import for credit-card statements or banks without CODA), and facilitating invoice payment through SEPA EPC QR codes.

EMPayment manual matching: ranked proposals and basket

Why EMPayment?

  • EPC QR codes on your PDF invoices — The customer scans and the transfer is pre-filled (IBAN, BIC, amount, structured communication)
  • Belgian OGM/VCS — Belgian structured communications generated automatically
  • ISO 11649 (RF) — Creditor references for international invoices
  • CODA import — Manual or via the Codabox API, with full history and dashboard
  • CSV import — Credit-card statements and banks without CODA in the same work queue
  • Movements in the Dolibarr bank — Every movement of a validated statement becomes a native bank line, counted in the balance
  • Assisted reconciliation — Proposals ranked with a score out of 100 and plain-language reasons, multi-invoice basket
  • Customer AND supplier invoices — Plus expense reports, miscellaneous operations (bank fees, VAT, social security…) and internal transfers
  • Compatible with recent Dolibarr versions — PHP ≥ 8.1

Prerequisites

Item Requirement
Dolibarr Dolibarr ≥ 17
PHP PHP ≥ 8.1
Required Dolibarr modules Invoices, Third parties, Banks

For the Codabox integration: a Codabox account linked to your company's VAT number.


Installation

From the DoliStore

  1. Go to the DoliStore and search for EMPayment
  2. Purchase the module and download the ZIP archive
  3. In Dolibarr, go to Home → Setup → Modules/Applications → Deploy/install external app/module and upload the ZIP
  4. Or extract the archive into htdocs/custom/: the final folder must be htdocs/custom/empayment/

The archive already contains all its dependencies: no composer command is needed.

Activation

  1. Log in to Dolibarr as an administrator
  2. Go to Home → Setup → Modules/Applications
  3. Search for "EMPayment" and click Activate
  4. Grant the permissions to the relevant users (Users & Groups → Permissions)
Permission Use
View QR codes and payment information See an invoice's QR code
Generate QR codes for invoices Generate and download the QR code
Configure the EMPayment module QR / General setup pages
View CODA transactions and dashboard Read-only CODA screens
Validate CODA matches Confirm, ignore, put back to reconcile
Record CODA payments in Dolibarr Create the payments
Configure CODA/Codabox settings CODA/Codabox page

Updating from a previous version

  1. Back up the database before any update
  2. Deploy the new archive over the existing empayment folder
  3. Go to Setup → Modules → EMPayment → Maintenance and click Verify and update the database (or disable then re-enable the module: no data is deleted)

Replacing the files does not update the database: until the migration is applied, the module screens show a message asking for an administrator and write nothing. The Maintenance page shows the file version and the database version.

Since version 2.1, the CODA menu lives under Banks. Billing keeps a "CODA - invoice movements" shortcut.


Configuration

The configuration is in Setup → Modules → EMPayment, split into tabs: CODA/Codabox, CODA Logs, QR Code, General, Maintenance and About.

General tab: bank account and communication

General tab — default bank account, structured communication, emails

The QR code uses a Dolibarr bank account (IBAN, BIC, currency and owner come from the account card). The account is chosen in this order: the invoice's account → the third party's account → the default bank account for QR codes set here.

Parameter Description
Default bank account for QR codes Dolibarr account used when neither the invoice nor the third party has a forced account
Communication type Automatic (OGM if Belgium), Belgian OGM, ISO 11649 Creditor Reference (RF), Manual, or None (invoice reference only)
Email image mode Embedded image (Base64) or Secure URL link
Token validity (days) Validity duration of the public QR code URLs
Request limit Maximum requests per hour per IP on the public URLs

The former Default IBAN / Default BIC fields (legacy configuration) remain displayed as a fallback while the migration to a Dolibarr account is pending. Configure a Dolibarr account instead.

Important: fill in the owner name on the Dolibarr bank account card. It is the beneficiary name written into the QR code.

QR Code tab

QR Code tab — display and PDF integration

Parameter Description
Enable EPC QR Codes Shows the QR Code button on validated invoices
QR Code size (pixels) On-screen size (100-500)
Show details / Details position IBAN and communication next to the QR code (below, right side, left side)
Include in PDF Automatically adds the QR code to invoice PDFs
Position Header (after address) or Footer (after totals)
PDF size (mm) 15 to 60 mm
X / Y Position (mm) Exact position; 0 = automatic based on the chosen position

An Advanced Integration (developers) section provides the code to copy into a custom PDF model.

Email variables

Available in your invoice email templates:

Variable Description
__EMPAYMENT_QRCODE_IMG__ QR code image (embedded or linked, depending on the email image mode)
__EMPAYMENT_QRCODE_URL__ Secure public URL of the QR code
__EMPAYMENT_STRUCTURED_COMM__ Structured communication (alias: __EMPAYMENT_COMM_STRUCT__)
__EMPAYMENT_PAYMENT_INFO__ Payment information block
__EMPAYMENT_IBAN__ Beneficiary IBAN
__EMPAYMENT_AMOUNT__ Formatted amount

CODA/Codabox tab

CODA/Codabox tab — mode, matching, scheduled job, Codabox connection

Operation Mode

Parameter Description
CODA Mode Disabled, Manual (file import) or Automatic via Codabox
Environment Production for normal use; Sandbox for testing only

Matching Settings

Parameter Description
Partial payments Allows matching partial payments
Automatically confirm and record safe matches Off by default. See below
Automatic confirmation threshold Minimum score in % (empty = 99, 90 to 100)
Largest gap the manual match may close Small remaining due that the manual match offers to close with the "Discount" reason (empty = 1.00)
Supplier invoice matching Matches outgoing payments (debits) with supplier invoices

Automatic Processing (Scheduled Job)

Parameter Description
Enable automatic processing The scheduled job downloads, parses and matches the CODA files
Stop pipeline after step Download only, + Parse, + Match, or Full pipeline — useful at start-up to review each step
Dolibarr Scheduled Job Link to the "CODA Automatic Processing - EMPayment" job to set its frequency

The scheduled job is installed disabled (once a day by default): enable it in Tools → Scheduled jobs.

Codabox Connection (automatic mode)

  1. VAT Number: your company's, as registered with Codabox (e.g. BE0123456789)
  2. Request an access token: Codabox sends a verification email to the address linked to that VAT number
  3. Paste the token received by email: the API credentials are retrieved and stored encrypted
  4. Select the data feed of the relevant client
  5. Bank accounts: enable the accounts to process; only enabled accounts go through the automatic pipeline

The Connection status block offers Test connection and Reset connection.

Automatic confirmation of safe matches

When enabled, the scheduled job confirms the match and records the payment, but only if every guard holds: exact structured communication (OGM) or exact reference, score at least equal to the threshold, a single candidate invoice, an open invoice whose remaining due is exactly the movement amount, a payer consistent with the IBAN, a statement outside the frozen history. Otherwise the movement stays a suggestion. Every automatic confirmation is traced in the CODA log and can be reversed like a manual one. The scheduled job's user needs the "validate" and "record" permissions.


EPC QR Code

What is an EPC QR Code?

An EPC QR Code (standard EPC069-12 v3.1) is a QR code that banking apps recognise to pre-fill a SEPA transfer. The customer scans the code from their invoice and their banking app directly shows:

  • The beneficiary IBAN and name
  • The bank BIC
  • The invoice amount
  • The structured communication (OGM/VCS or RF)

No manual typing, no errors.

From the invoice card

A View EPC QR Code button appears on every validated invoice. It opens a window with the QR code, the structured communication and buttons to download or print it.

In PDF invoices

When Include in PDF is enabled, the QR code is added to invoice PDFs at the configured position (header or footer). A fully paid invoice no longer shows a payment QR code. PDFs already generated do not change: regenerate the PDF after changing the configuration.

Structured communications

Type Format Usage
OGM/VCS +++XXX/XXXX/XXXXX+++ Belgian invoices
ISO 11649 (RF) RF12 1234 5678 9012 International SEPA invoices
Automatic OGM if Belgium Recommended

Tip: the OGM/VCS structured communication is recognised at CODA import; it is the strongest signal for matching.


CODA / Codabox / CSV Import

The Banks → CODA menu groups the CODA Dashboard, CODA movements, Classify / reconcile, CODA Import, CODA History and Recorded tabs.

Dashboard

The dashboard shows the state of the files (processed, validated, in error), of the bank chain (lines created or adopted, ambiguous movements, orphans, not yet in the bank), the matching statistics and the Pipeline control: Fetch from Codabox, Parse Files, Run Matching, Record Payments.

Manual CODA file import

CODA Import tab — CODA file and CSV file

Drag and drop a .cod, .coda or .txt file, choose the associated bank account, then import. A file already imported is refused.

CSV import (card statement, other bank)

The Import movements from a CSV file section accepts credit-card statements and banks without CODA:

  1. Choose the file and the Dolibarr bank account, then Preview
  2. Check the recognised columns (date, value date, counterparty, communication, signed amount or debit/credit, currency, original amount, unique identifier), the separator and the date and decimal formats — all editable
  3. Every line is checked: new, already imported, duplicate in the file, unreadable
  4. The import is all or nothing: an unreadable line or a line in another currency than the account blocks the whole file

Imported movements join the same queue as CODA movements (same proposals, same basket). The template can be remembered per account (Remember this template for this account).

Movements in the Dolibarr bank

Before any matching, each statement is checked (account, currency, opening balance + movements = closing balance, number of movements). The movements of a validated statement become Dolibarr bank lines, visible in Banks and counted in the balance. A payment already keyed in by hand is adopted instead of duplicated when the link is certain; otherwise the movement is flagged ambiguous and is resolved on the Maintenance page.

History and logs

CODA History lists the audit log (downloads, parsing, matches, payments, ignored movements), filterable by type. The CODA Logs setup tab gives the same traceability on the administration side.


Bank Reconciliation

Classify / reconcile

The Classify / reconcile tab is the single entry point:

  • Suggested matches — to confirm in one click
  • Awaiting recording — confirmed matches whose payment still has to be written into Dolibarr
  • Unmatched CODA movements — the work queue, with each movement's best proposal and the All, Ready to validate, To check, No lead filters

Keyboard shortcuts: J / K to move between movements, Enter or O to open one, I to ignore it, X to tick it, 1 to 4 for the filters, ? for help. They are off while typing and only click a visible button: every action keeps its confirmation.

Manual matching

Manual matching — ranked proposals, basket and open invoices

For each movement, the screen shows:

  • Proposals with a score out of 100 and their reasons (exact amount, reference in the communication, known IBAN, payment aggregator, days apart…). Sources: a payment already keyed in Dolibarr, an open invoice, a combination of 2 to 5 invoices whose sum is exact
  • Basket: one or more invoices (customer or supplier), with the total compared to the movement
  • Open invoices: search by reference, amount or third-party name

Click Add to basket, adjust, then Validate reconciliation. Shortcuts: 1 to 5 for the matching proposal's action, V to validate.

Special cases handled by the basket:

Situation What EMPayment offers
Payment already keyed in by hand from the invoice Link this payment: the keyed payment's bank line is adopted, no second payment, the balance stays right
Small remaining due (e.g. 49.00 paid on 49.01) Leave the remaining due open, or close the invoice with the "Discount" reason (up to the configured maximum gap)
One cent too much Accepted as an overpayment, the invoice is classified paid
Larger excess Customer deposit, or ignore the excess
Payment provider that withheld its fees (Stripe, Mollie, PayPal…) Fees withheld: invoices paid in full, the gap is booked as bank fees (Belgian PCMN account 656 by default) on a separate bank line; cap: 3% of the movement or 30.00 if larger, never more than 10%
One movement settling invoices of several third parties (e.g. Amazon direct debit) The movement is split into one bank line per third party, each carrying its own payment (if the bank line was created by EMPayment)

Miscellaneous operations and remembered rules

Classify as miscellaneous payment offers a category (bank fees, interest paid or received, VAT, social security, withholding tax, advance tax payment, cash, manager's current account, other) that pre-fills the PCMN accounting account and the label; the review step always shows the account before recording.

Remember for next time? saves a rule for the counterparty and the bank account: the next movement from that counterparty receives the proposal "Miscellaneous operation: category (rule)", with a button opening the pre-filled dialog. A rule never classifies anything on its own.

Ignore, put back, reverse

  • Ignore asks for a reason: duplicate, out of scope, already booked elsewhere, zero amount, pending, other (with details). The movements list shows the reason, the author and the date. A selection can be ignored in bulk
  • Put back to reconcile returns an ignored movement to the queue
  • A payment recorded by EMPayment can be reversed from the movements list (including a split movement) as long as its lines have not been transferred to accounting; after that, correct it with a reversing entry

Supplier invoices, expense reports, transfers

Reconciliation works both ways: incoming payments (customer invoices) and outgoing payments (supplier invoices, expense reports). An incoming payment never proposes a supplier invoice. Transfers between your own accounts are detected as internal transfers.


Maintenance

The Maintenance setup tab groups:

  • Database status and the Verify and update the database button
  • Repair unlinked CODA files not linked to a bank account (safe, even when run several times)
  • Ambiguous movements (human resolution): adopt the existing line, create a line, or treat without a line
  • Orphaned movements (bank line deleted outside the module): re-materialisation on explicit action
  • Historical migration (per account): dry run by default, applied with a pivot date and confirmation
  • Bank links to check (read-only)

Troubleshooting

The QR Code button or the PDF QR code does not appear → Check that the invoice is validated, that Enable EPC QR Codes (and Include in PDF for the PDF) is on, and that a bank account with an IBAN is found (invoice → third party → default account). A fully paid invoice shows no QR code in the PDF. Regenerate the PDF after any change.

"Error generating QR Code" in the QR window → The beneficiary name is empty: fill in the owner name on the card of the Dolibarr bank account used.

After an update, the screens ask for an administrator → The database migration has not been applied: Maintenance → Verify and update the database. A failed migration does not move the recorded version forward; fix the reported cause and run it again.

Activation fails with "Menu entry … already exists" (versions 2.1.0 and earlier) → Update, then simply re-enable the module: since 2.1.1, activation puts its own menu entries back in order.

CODA files in error "codelicious/coda-parser library not found" → The module folder is incomplete (missing vendor/ folder). Redeploy the full archive, then click Retry the N errored files in the CODA Import tab.

Statements from one bank do not appear (unlinked files) → Check that the account is enabled in CODA/Codabox → Bank accounts, then Maintenance → Repair unlinked CODA files. Statements using the Belgian BBAN format (12 digits, e.g. ING) are linked to the matching IBAN since 1.12.3.

The Codabox connection fails → Check the Environment (Production for normal use), the VAT number as registered with Codabox, then Test connection. As a last resort, Reset connection and request a new token.

Nothing is imported automatically → The "CODA Automatic Processing - EMPayment" scheduled job is disabled at installation: enable it in Tools → Scheduled jobs, and tick Enable automatic processing. Also check Stop pipeline after step. The dashboard's Fetch from Codabox button starts an immediate download.

The dashboard reports a history frozen by the 2.0 starting point → Statements from before the move to 2.0 are not processed by the automatic pipeline. Process them account by account via Maintenance → Historical migration.

Safe matches stay as suggestions → The option is off by default; once enabled, every guard must hold and the scheduled job's user needs the "validate" and "record" permissions.

A payment appears twice in the bank → It was keyed in by hand after the movement was imported: open the manual matching and use Link this payment.

"A bank movement can only settle invoices of a single third party" → Dolibarr's bank journal cannot book a line shared between several third parties. A split is only possible when the bank line was created by EMPayment; otherwise, match invoice by invoice or leave the movement pending.

The transfer to accounting refuses bank lines → CODA lines not yet classified (unmatched, ambiguous, orphaned) are blocked on purpose. Classify them in Classify / reconcile or resolve them in Maintenance.

Supplier invoices are not proposed → Enable Supplier invoice matching in the CODA/Codabox tab, and choose Supplier invoices in the manual matching.


FAQ

Is the EPC QR Code compatible with all banking apps?

The EPC069-12 standard is recognised by the banking apps of the SEPA area, including those of the main Belgian banks.

Does EMPayment work without Codabox?

Yes. Choose the Manual (file import) mode and import your CODA files, or your CSV statements. Codabox is optional and automates the retrieval.

Is the OGM/VCS structured communication generated automatically?

Yes. EMPayment generates the Belgian structured communication (OGM/VCS) of each invoice following the official Belgian algorithm.

Can EMPayment be used with EMPeppol?

Yes. EMPeppol already generates an EPC QR code for received invoices. On the sending side, EMPayment adds the EPC QR code to your own PDF invoices. The two modules are complementary.

Where to find help?

  • E-dem Support: Contact us for any technical question