Introducing the Chargebee CLI

EEZI Configuration Guide

This guide walks you through connecting a Chargebee business entity to the EEZI e-invoicing adapter, so that invoices and credit notes are submitted as e-invoices. Complete your EEZI setup first, then create one connection for each entity in Chargebee.

Before you start configuring EEZI

You need:

  • Access to the EEZI dashboard for each entity, to copy its API key.
  • Admin access to your Chargebee site, with e-invoicing available for the entity.
  • Your legal details for each entity: organization address, tax registration number, and bank payment instructions.

One EEZI entity maps to one Chargebee business entity. If a business entity does not need e-invoicing, leave it unconnected. Its invoices are issued as usual.

Mandatory fields for EEZI e-invoicing

Every field marked Yes must be filled in. Otherwise, the document is blocked before it is sent. The fields fall into four groups: the connection, the business entity, the customer, and the invoice.

Connection fields on the E-Invoicing page

FieldMandatoryWhere it comes fromNotes
Entity nameYesEEZI dashboard, entity dropdownA label for you to recognize the connection. It is not validated. The connection page labels this field EEZI Organisation ID.
Entity API keyYesEEZI dashboard, entity settingsThe token that starts with ey. There is one key for each entity. Always use that entity's own key.
PEPPOL invoicing modelYes for GermanyChargebee configurationRequired for Germany. Add it with Manage on the country. Spain uses Verifactu.
Enabled countriesYesChargebee configurationEvery country you sell into, including your own.
Routing ruleYesChargebee configurationTaxable address country and document currency, set up for the invoice and for the credit note. See EEZI routing rules.
Integration switched onYesChargebee configurationEnable invoice and credit note from the three-dot menu on the E-Invoicing page.

After you enter the API key, click Test connection to confirm that it authenticates. Use the enable/disable switch to turn the integration on or off for the entity.

Business entity fields in Chargebee

FieldMandatoryWhere it comes fromNotes
Organization addressYesChargebeeComplete, and in the entity's own country. For example, use a German address for a German entity.
Tax registration numberYesYour tax authorityEnter it under Settings > Configure Chargebee > Billing (Taxes). Edit Germany in the EU region, then set the label, tax registration number, and VAT %.
Payment instructions: bank name and account numberYesYour finance teamInvoices without them are rejected.
Endpoint scheme IDCountry-specificEEZI country rulesGermany uses 9930. Confirm other countries with EEZI.

Customer fields

FieldMandatoryWhere it comes fromNotes
Taxable address countryYesCustomer recordSet a German billing address for German customers. Routing reads the taxable address country.
VAT numberYes for business customersCustomer recordConsumers without one are skipped by the routing condition and invoiced as usual.

Invoice and credit note fields

FieldMandatoryWhere it comes fromNotes
Unique document numberYesChargebeeEEZI rejects a number it has already received. Use a distinct number or prefix, especially in tests.
Invoice currencyYesSubscriptionMust match the currency in your invoice routing rule. For credit notes, the credit note currency must match the credit note routing rule.
Payment instructionsYesTaken from the entityMissing instructions cause a submission error.

Step-by-step EEZI configuration

The configuration covers these steps: connect to EEZI, add the organization address, set up e-invoicing, enable tax, add the payment instruction, and test the integration. The example configures Germany with Euro invoices. Repeat the steps for each entity and country you need.

Have the entity API key from the EEZI dashboard ready. Find it in the entity settings, as the token that starts with ey. Enter it with the entity name wherever the EEZI connection asks for it.

Connect to EEZI

Connect your Chargebee site to EEZI first. If you connect more than one entity, repeat this step with each entity's own details.

  1. In the EEZI dashboard, open the entity's settings and copy its API key, the token that starts with ey.

  2. Open the EEZI connection in Chargebee. Use whichever route applies:

    • In E-Invoicing settings for the entity, find the EEZI e-invoicing app in the available providers, and start the connection from there.
    • If the app is not in the marketplace, use the direct link. In your browser's address bar, add the following path after your Chargebee domain, replacing <your-site> with your Chargebee site name: https://<your-site>.chargebee.com/third_party/einvoicing_providers/eezi/initialization
  3. Either route opens the Integrate Chargebee with EEZI page. Click Get started. Enter the EEZI API Key and the EEZI Organisation ID, and then click Authenticate.

A valid credential connects your site to EEZI.

Add the organization address for EEZI

  1. Go to Settings > Configure Chargebee > Business Profile.

  2. Add the organization address for the entity. If an address is already saved, click Update address. For a German entity, use a German address.

Set up e-invoicing for Germany

Open the E-invoicing page at Settings > Configure Chargebee > E-invoicing. On a Multi Business Entity site, you can open this page at the site level or for each entity. Start by enabling a country.

  1. Click Add Country, select Germany, and click Continue.

  2. Click Manage for Germany. Click Add Model, select PEPPOL, and click Submit.

  3. Add the documents. Under B2B Customers, select INVOICE and CREDIT_NOTE, and click Confirm.

  4. Set up the invoice routing rule, and then click Finish. The rule is:

    • WHEN Taxable Address Country equals DE
    • AND Invoice Currency is Euro
  5. Set up the credit note routing rule, and then click Finish. The rule is:

    • WHEN Taxable Address Country equals DE
    • AND Credit Note Currency is Euro
  6. Enable both documents. Click the three-dot menu next to Invoice and next to Credit note, and then turn on each one.

E-invoicing configuration is now complete.

Enable tax for Germany

  1. Go to Settings > Configure Chargebee > Taxes.

  2. Click Add region, and select the EU region.

  3. Click the three-dot menu next to Germany, and then select Edit.

  4. Set the label to VAT Reg #. Enter the entity's tax registration number, the tax name, and the tax rate, and then click Update.

Tax is now enabled.

Add the payment instruction for EEZI

Invoices without bank details cause a submission error, so add a bank transfer payment instruction before you test.

  1. Go to Settings > Configure Chargebee > Customize Invoices, Credit Notes and Quotes.

  2. Click Add Payment Instructions, and select Bank Transfer.

  3. Enter the Bank name and the Account number.

  4. Click Done. Without this step, the details stay saved as a draft.

Test the EEZI integration

  1. Create a business customer with a German billing address and a VAT number.

  2. Create a subscription on a plan in the configured currency (Euro).

  3. Chargebee generates an invoice, and the e-invoice is processed. The invoice shows In progress until the daily status refresh. After the refresh, Success means the tax authority accepted the invoice.

  4. Click the menu in the E-Invoices section, and then click Download xml.

If you cannot get a step to pass, see Troubleshooting EEZI e-invoicing.

EEZI routing rules

A routing rule decides which invoices and credit notes go to EEZI. Each rule is set up per document type with a WHEN condition. For Germany in Euro, the rule is: Taxable Address Country equals DE, and the document currency is Euro. Add more conditions for the scenarios in this table.

ScenarioCondition to addWhat happens
Business customer in a connected countryTaxable address country matches, and the customer has a VAT numberThe document is sent to EEZI.
Consumer in the same country (no VAT number)Only trigger when the VAT number is not emptyThe document is skipped and issued as usual. No e-invoicing error occurs.
Selling from one country into another (for example, Germany to Spain)Enable the destination country, and add a rule for itDocuments for both countries are sent.
Government customersAdd a condition that separates government customers from other business customers using custom fieldsRouted by a separate rule.
Entity that does not need e-invoicingNo connection for that entityInvoices are issued as usual.

Common routing rule mistakes

  • Address field: Build the rule on Taxable Address Country, as in the Germany example. A rule built on a different address field might not trigger.
  • Missing VAT number: Without the VAT number condition, consumer invoices in an e-invoicing country raise errors.
  • Currency: The rule uses the document currency, so check that it matches how you bill.
  • Changed customer address: Create a new invoice to test the change, rather than relying on an existing invoice.

Multi Business Entity and cross-border EEZI setups

On a Multi Business Entity (MBE) site, each business entity needs its own connection, because EEZI issues API keys for each entity. On a site without multiple business entities, you can integrate one EEZI company at the Chargebee site level.

Configure several EEZI entities

  1. In the EEZI dashboard, create or select each entity, and copy that entity's own API key.
  2. In Chargebee, open the configuration for the first entity, and complete the step-by-step setup with its key, address, tax registration number, and payment instructions.
  3. Repeat step 2 for every other entity that needs e-invoicing. Skip entities that do not need e-invoicing. They keep issuing invoices as usual.

Two entities in the same or different countries are configured independently, each with its own tax registration number and payment instructions.

How EEZI processes e-invoices

Before a document is sent, Chargebee checks it against your routing rules and mandatory fields. A document that fails either check never leaves Chargebee. A document that is sent stays in progress until the daily status refresh, and then ends as success or rejected.

Troubleshooting EEZI e-invoicing

Errors caused by missing data or by EEZI appear on the invoice in Chargebee. Tax reports and official reports stay in the VAT IT dashboard.

SymptomLikely causeFix
Invoice is not sent at allTaxable address country or currency does not match the rule, or the rule or country is not enabledCheck that the rule uses Taxable Address Country and the document currency, and that the country, invoice, and credit note are enabled.
Submission fails with a payment errorPayment instructions are missingAdd the bank name and account number, then void the invoice and create a new one. An invoice with payments cannot be voided until those payments are removed. See Void an invoice.
Test connection failsWrong or expired key, or a key from a different entityCopy the key token again from that entity's settings.
Invoice stays in progressStatus updates run once a dayCheck again after the next 02:00 UTC refresh.
Need to change a sent invoiceSent invoices cannot be editedIf EEZI rejected the invoice, or it was not sent, remove any linked payments, void the invoice, and create a new one. If EEZI accepted the invoice, do not replace it until a cancellation document exists. For Germany, enable Void invoice with credit note under Settings > Configure Chargebee > Billing LogIQ > Billing & Invoices, then void the invoice. That void creates the credit note. An invoice with payments cannot be voided until those payments are removed.
No PDF to downloadSome countries provide only XMLUse the XML. A PDF appears only where the country offers one.