> ## Documentation Index
> Fetch the complete documentation index at: https://docs.invopop.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Chargebee in Denmark

> Send compliant Peppol e-invoices from Chargebee to Danish customers

Denmark uses the Peppol network and the Peppol BIS Billing UBL format. However, unlike Belgium, Danish Peppol participant IDs come in a wide variety of schemes — GLN numbers, CVR numbers, and others — and they don't all derive from the VAT number. This makes automatic lookup unreliable, so **this workflow does not include a Lookup Peppol participant step**. You will need to set the Peppol ID directly on each customer as a custom field.

If you do want to use automatic lookup for some customers, you can add the lookup step from the [generic Peppol template](/guides/peppol).

This guide assumes you have already connected the Chargebee app and completed the general setup — see the [Chargebee overview](/guides/chargebee) first if you haven't.

**Required apps:** [Peppol](/apps/peppol), [OASIS UBL](/apps/oasis-ubl)

<Info>
  Before processing any invoices, you must register your supplier on the Peppol network through Invopop. See the [Peppol guide](/guides/peppol) for full registration steps.
</Info>

<iframe className="w-full aspect-video rounded-xl" src="https://www.youtube.com/embed/6Gsq8fPcpuo" title="Chargebee + Invopop | Send e-invoices in Denmark" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen loading="lazy" />

## Workflow

<Tabs>
  <Tab title="Template">
    <Card title="Chargebee DK E-invoicing" icon="code-branch" iconType="duotone" href="https://console.invopop.com/redirect/workflows/new?template=chargebee-cb-dk-peppol" cta="Add to my workspace">
      Syncs with Chargebee and sends via Peppol to Danish customers, with automatic SEPA payment key handling.
    </Card>
  </Tab>

  <Tab title="Code">
    <Note>
      Unlike other Peppol countries, this template does not include a **Lookup Peppol participant** step. Danish Peppol participant IDs can take a variety of formats — such as GLN numbers — that are difficult to resolve automatically from a VAT number alone. We recommend setting the `cf_gobl_customer_inbox_peppol` [custom field](/guides/chargebee#custom-fields-metadata) directly on each customer in Chargebee so that Invopop can use it without needing to perform a lookup.
    </Note>

    <Note>
      The **Fixing bank-transfer details** step converts the generic `credit-transfer` payment key to `credit-transfer+sepa`. Denmark requires the more specific SEPA key for Peppol invoices, so this step ensures the payment instructions are valid before the document is sent.
    </Note>

    ```json Example Chargebee Peppol invoice (DK) workflow theme={"system"}
    {
        "name": "Chargebee Peppol invoice (DK)",
        "description": "Sync from Chargebee and send via Peppol to DK customers",
        "schema": "bill/invoice",
        "steps": [
            {
                "id": "84944c00-16e1-11f1-96ed-bb71a2a9b3a3",
                "name": "Import document from Chargebee",
                "provider": "chargebee.import"
            },
            {
                "id": "33e23480-10ab-11f0-a09e-7b63571a4ae2",
                "name": "Set state",
                "provider": "silo.state",
                "summary": "Set state to `processing`{.state .processing}",
                "config": {
                    "state": "processing"
                }
            },
            {
                "id": "7dad54c0-154a-11f0-8028-c1ed648b57b5",
                "name": "Fix bank-transfer details",
                "provider": "silo.modify",
                "notes": "Normalizes the payment key to SEPA credit transfer format",
                "summary": "Normalize payment key to SEPA",
                "config": {
                    "jq": "if .payment?.instructions?.key == \"credit-transfer\" then\n  .payment.instructions.key = \"credit-transfer+sepa\"\nelse\n  .\nend",
                    "merge_type": "application/jq",
                    "scope": "doc",
                    "sign": false
                }
            },
            {
                "id": "cfe249c0-1c93-11f1-8e47-3f51862e93e3",
                "name": "Modify silo entry",
                "provider": "silo.modify",
                "summary": "Add `eu-en16931-v2017` addon",
                "config": {
                    "addons": [
                        "eu-en16931-v2017"
                    ]
                }
            },
            {
                "id": "fb06b190-10aa-11f0-a09e-7b63571a4ae2",
                "name": "Sign envelope",
                "provider": "silo.close"
            },
            {
                "id": "fc5aa8d0-10aa-11f0-a09e-7b63571a4ae2",
                "name": "Generate UBL document",
                "provider": "ubl.generate",
                "summary": "Peppol BIS Billing v3",
                "config": {
                    "attach_invoice_pdf": false,
                    "doc_type": "bis-invoice-v3",
                    "private": false,
                    "validate_ubl": true
                }
            },
            {
                "id": "075442a0-10ab-11f0-a09e-7b63571a4ae2",
                "name": "Send Peppol document",
                "provider": "peppol.send"
            },
            {
                "id": "3037a310-10ab-11f0-a09e-7b63571a4ae2",
                "name": "Set state",
                "provider": "silo.state",
                "summary": "Set state to `sent`{.state .sent}",
                "config": {
                    "state": "sent"
                }
            },
            {
                "id": "c4c34420-16e1-11f1-96ed-bb71a2a9b3a3",
                "name": "Update Chargebee",
                "provider": "chargebee"
            }
        ],
        "rescue": [
            {
                "id": "39513240-10ab-11f0-a09e-7b63571a4ae2",
                "name": "Set state",
                "provider": "silo.state",
                "summary": "Set state to `error`{.state .error}",
                "config": {
                    "state": "error"
                }
            },
            {
                "id": "ccc262a0-16e1-11f1-96ed-bb71a2a9b3a3",
                "name": "Update Chargebee",
                "provider": "chargebee"
            }
        ]
    }

    ```
  </Tab>
</Tabs>

## Peppol participant ID

Since there is no automatic lookup, the Peppol Participant ID must be set on each Danish customer before any invoices are processed. Use Chargebee's [bulk operations](https://www.chargebee.com/docs/2.0/bulk-operations.html) to back-populate this field across all your Danish customers before going live.

| Field                 | Metadata key                 | Custom field key                | Example                    |
| --------------------- | ---------------------------- | ------------------------------- | -------------------------- |
| Peppol Participant ID | `gobl-customer-inbox-peppol` | `cf_gobl_customer_inbox_peppol` | `0088:5790000435968` (GLN) |

<Note>
  The metadata keys listed above follow the Chargebee metadata format (hyphens, no `cf_` prefix). If you prefer to use custom fields instead, replace hyphens with underscores and add the `cf_` prefix. See [Custom fields & metadata](/guides/chargebee#custom-fields-metadata) for details.
</Note>

## SEPA payment key

The workflow includes one Denmark-specific step: **Fixing bank-transfer details**. If Chargebee sends a `credit-transfer` payment instruction on the invoice, this step automatically converts it to `credit-transfer+sepa`. Plain `credit-transfer` is not accepted in Denmark — the more specific SEPA variant is required. If the invoice has no payment instructions, the step is skipped. That's the only difference from a standard Peppol workflow.

## FAQ

<AccordionGroup>
  <Accordion title="What should we do if the customer doesn't belong to the Peppol network?">
    In countries where Peppol is the standard but not mandatory, you may still need to issue an e-invoice when the recipient isn't on the network. Both parties can agree on an alternative transfer method, but the invoice must still be EN16931 compliant.

    Recommended approach:

    * Set up a separate workflow that generates the XML without the send-Peppol-document step
    * Or reuse your existing workflow without the customer Peppol ID — the send step is automatically skipped
    * Fetch the generated XML and deliver it through the agreed channel, typically email
  </Accordion>

  <Accordion title="How do I handle B2C invoices in Peppol?">
    B2C invoices typically lack the structured customer information required for Peppol delivery, and most consumers don't have inboxes. Use a conditional workflow:

    1. Add an **If/Else** step that checks for a customer inbox using `count(customer.inboxes, true) > 0`.
    2. On the `false` branch, generate a PDF and email it to the customer, then stop the flow.

    This routes B2B invoices through Peppol while keeping a smooth path for consumers.
  </Accordion>

  <Accordion title="How do I handle 'Receiver Not Found' errors?">
    If a job fails with `KO` and `receiver not found in the peppol network`, treat it like an invalid email address — the recipient simply isn't reachable on Peppol. Add the **Lookup Participant ID** step (ideally in a separate validation workflow run against customer data) so you catch missing IDs before generating the invoice.
  </Accordion>

  <Accordion title="Should I set the `$regime` field when using Peppol?">
    No. The regime is automatically derived from the supplier's settings, which is the recommended approach for Peppol — leave it unset on the document.
  </Accordion>

  <Accordion title="Where do I find Peppol GOBL documentation?">
    See the [`oasis-ubl-v2`](https://docs.gobl.org/addons/oasis-ubl-v2) addon and the [Peppol app reference](/apps/peppol) for required fields, supported document types, and Participant ID schemes.
  </Accordion>
</AccordionGroup>

More available in our [Denmark FAQ](/faq/denmark) section

***

<Card title="Participate in our community" icon="forumbee" href="https://community.invopop.com" arrow="true" horizontal>
  Ask and answer questions about your Chargebee integration →
</Card>
