ml-connector
DATEVChargebee

DATEV and Chargebee integration

DATEV is the accounting backend German businesses file through. Chargebee runs their subscription billing and recurring revenue. Connecting the two means the invoices, payments, and credit notes Chargebee produces each billing cycle land in DATEV as posted bookings, without a clerk re-keying them or a CSV being built by hand. ml-connector reads the revenue activity from Chargebee and submits it to DATEV as EXTF or DXSO file jobs, then watches each job to completion. Because DATEV bookings are write-only and its general ledger is not readable over the API, the chart of accounts stays configured in DATEV and ml-connector never reads ledger entries back.

How DATEV works

DATEV is not a conventional REST ERP. Its on-premise Rechnungswesen engine accepts finalized bookings only as asynchronous EXTF CSV file jobs, and DATEV Unternehmen Online accepts booking suggestions as DXSO XML jobs and document uploads (invoice PDFs). A small REST surface lists clients and their client-specific document types, but the chart of accounts, customers, and vendors are not exposed as readable endpoints. Authentication is OAuth 2.0 Authorization Code with PKCE through login.datev.de, access tokens last 900 seconds, and there are no webhooks, so job status is checked by polling.

How Chargebee works

Chargebee exposes customers, subscriptions, invoices, payments, transactions, credit notes, items, and item prices through its v2 REST API. Authentication is HTTP Basic, where the API key is the username and the password is left empty, scoped per site and per environment. The base URL is built from the site name and region (US, EU, or AU), and reads use offset-based pagination capped at 100 records per page. Chargebee also pushes outbound webhooks for events such as invoice_generated and payment_succeeded, secured by Basic auth on the endpoint or a secret token in the URL rather than an HMAC signature.

What moves between them

The flow runs one direction, from Chargebee into DATEV. After each billing cycle, ml-connector reads Chargebee invoices, payments, transactions, and credit notes and submits the matching bookings to DATEV: invoices and credit notes become debit and credit lines in an EXTF booking batch or a DXSO booking suggestion, and the invoice PDFs are uploaded to DATEV Unternehmen Online as outgoing-invoice documents. Each booking line is posted against the revenue, receivable, and tax accounts you map in advance, because DATEV does not expose its chart of accounts for lookup. Bookings are write-only in DATEV, so nothing is read back, and Chargebee has no purchase orders, vendors, or general ledger, so the integration stays on the sold side.

How ml-connector handles it

ml-connector stores both credential sets encrypted. On the Chargebee side it sends the API key as the Basic auth username with an empty password, keeping the mandatory trailing colon that some HTTP libraries drop, and derives the correct base URL from the site name and region so an EU site is never called against the US host. On the DATEV side it runs the OAuth2 PKCE flow with an S256 code challenge and a state value of at least 20 characters, sends the Authorization bearer plus the X-DATEV-Client-Id header on every call, and refreshes the 15-minute access token using only the client_id. Revenue accounts, tax codes, and the client-specific DATEV document types are mapped first, since none of them are readable from DATEV, so every booking line resolves to a real SKR account and every PDF to a valid document type. ml-connector polls Chargebee on a schedule tied to your billing calendar, paging through the offset-based results, and where Chargebee webhooks are enabled it consumes the event and re-fetches it by id rather than trusting the pushed payload. Each EXTF file is given a stable deterministic filename so DATEV duplicate detection makes re-submission retry-safe, and DUO uploads use the idempotent PUT-with-GUID form. After submitting an EXTF or DXSO job, ml-connector polls the job status endpoint with exponential backoff until it completes or fails, because DATEV processes asynchronously and never confirms synchronously. Chargebee 429 responses are honored through the Retry-After header, every record carries a full audit trail, and a failed submission can be replayed.

A real-world example

A German B2B software company with around 120 employees bills its subscription product through Chargebee and files its accounts through DATEV, managed by an external tax advisor. Before the integration, a bookkeeper exported the Chargebee invoice and payment lists each month, hand-built an EXTF CSV, fixed character-encoding rejections, and emailed PDFs to the advisor, which delayed the books and produced posting errors against the wrong revenue accounts. With DATEV and Chargebee connected, each cycle's invoices, payments, and credit notes are submitted to DATEV as booking batches against the correct SKR accounts and tax codes, the invoice PDFs upload to DUO automatically, and every job is polled to a confirmed result. The monthly export-and-rekey step is gone and the advisor receives clean, posted bookings.

What you can do

  • Submit Chargebee invoices, payments, and credit notes into DATEV as EXTF CSV or DXSO XML booking batches each billing cycle.
  • Upload Chargebee invoice PDFs into DATEV Unternehmen Online as outgoing-invoice documents using the client-specific document types.
  • Map Chargebee items and tax to the DATEV revenue, receivable, and tax accounts you configure, since DATEV does not expose its chart of accounts.
  • Bridge Chargebee zero-password Basic auth and the DATEV OAuth2 PKCE login, refreshing the 15-minute DATEV token automatically.
  • Poll each asynchronous DATEV import job to completion with retries, stable filenames for safe re-submission, and a full audit trail on every record.

Questions

Which direction does data move between DATEV and Chargebee?
Data moves one direction, from Chargebee into DATEV. Invoices, payments, transactions, and credit notes are read from Chargebee and submitted to DATEV as booking batches, with the invoice PDFs uploaded to DATEV Unternehmen Online. DATEV bookings are write-only and its general ledger is not readable over the API, so ml-connector never reads posted entries back, and Chargebee has no procurement or AP data to move.
How does the integration deal with DATEV not exposing its chart of accounts?
DATEV does not let you read its chart of accounts, customers, or vendors over the API, so those cannot be discovered automatically. ml-connector maps Chargebee items and tax to the DATEV revenue, receivable, and tax accounts (SKR03 or SKR04) you provide at setup, and to the client-specific document types it does fetch from DATEV before uploading. Every booking line and PDF then lands on a valid account and type.
Does DATEV confirm a posting immediately, or is it asynchronous?
DATEV processing is asynchronous and sends no webhooks. ml-connector submits each EXTF or DXSO file as a job, then polls the job status endpoint with exponential backoff until it reports complete or failed. Files are given stable deterministic names so DATEV duplicate detection makes a retry safe, and the result is recorded in the audit trail rather than assumed from the submit call.

Related integrations

Connect DATEV and Chargebee

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started