> ## 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.

# DIAN Colombia

> Submit invoices to the Colombian DIAN system.

<Tabs>
  <Tab title="Description">
    <Columns cols="2">
      <div class="flex flex-col grow items-center justify-center">
        <Card title="DIAN Colombia" icon="https://assets.invopop.com/apps/dian-colombia/icon.svg" href="/guides/co-dian" horizontal>
          View implementation guide ›
        </Card>
      </div>

      |           |                                  |
      | --------- | -------------------------------- |
      | Developer | [Invopop](https://invopop.com)   |
      | Category  | Government                       |
      | Scope     | B2B, B2C                         |
      | Country   | [Colombia](/compliance/colombia) |
    </Columns>

    The [DIAN](https://www.dian.gov.co/) in Colombia stands for *Dirección de Impuestos y Aduanas Nacionales* (National Directorate of Taxes and Customs). It is the government agency responsible for managing and overseeing tax collection, customs operations, and facilitating international trade.

    Electronic invoicing in Colombia is mandatory and operates on a real-time clearance model whereby every invoice must receive a unique identifier called a CUFE (*Código Único de Factura Electrónica*) issued by the DIAN.

    Invopop has partnered with [Plemsi](https://plemsi.com) to issue invoices in Colombia (DIAN). You have the option of either using Invopop's Plemsi billing account or create your own and provide your own credentials.

    **Key Features**

    * **Workflow Automation:** This app provides automated workflows for issuing invoices and credit notes through the DIAN system.
    * **Real-Time Clearance:** Every invoice receives a unique CUFE code from the DIAN in real-time, ensuring compliance with Colombian e-invoicing regulations.
    * **Legally Compliant PDF Invoices:** Invoices are generated with all mandatory fields and CUFE codes, as required by Colombian invoicing legislation.
    * **Plemsi Integration:** Direct integration with Plemsi, an authorized technology provider for DIAN electronic invoicing.
    * **UBL 2.1 generation:** Compliant XML generation is supported for the DIAN schema.
    * **QR Code:** Generates the DIAN QR code according to the DIAN specifications.

    Make sure to check out our [DIAN Colombia Guide](/guides/co-dian) for instructions on how to issue invoices and set up your workflows.
  </Tab>

  <Tab title="Actions">
    The following workflow actions will be available once you install and enable this app:

    <Card title="Send to Plemsi (DIAN)" icon="https://assets.invopop.com/apps/dian-colombia/plemsi/icon.svg" horizontal>
      <div class="pop-count"><Icon icon="https://assets.invopop.com/icons/pops.svg" /> 5</div>
      Process invoices using Plemsi in Colombia.
    </Card>
  </Tab>

  <Tab title="Workflows">
    The following workflows are available to make your integration easier. Use them as templates to build upon.

    <AccordionGroup>
      <Accordion title="DIAN Colombia invoice workflow">
        This workflow automates FEV Colombian invoice processing and tax compliance.

        ```json Example DIAN issue invoice workflow theme={"system"}
        {
          "name": "DIAN issue invoice",
          "description": "Issue an invoice through DIAN and generate PDF",
          "schema": "bill/invoice",
          "steps": [
            {
              "id": "ece780f0-322c-11f0-bbb5-9da15d555d80",
              "name": "Set state",
              "provider": "silo.state",
              "summary": "Set state to `processing`{.state .processing}",
              "config": {
                "state": "processing"
              }
            },
            {
              "id": "7d803770-322c-11f0-bbb5-9da15d555d80",
              "name": "Add sequential code",
              "provider": "sequence.enumerate",
              "summary": "Dynamic · DIAN · 1",
              "config": {
                "name": "Colombia",
                "padding": 1,
                "prefix": "",
                "start": 1
              }
            },
            {
              "id": "fc75e4f0-8721-11ef-a962-73e3f2037a52",
              "name": "Sign envelope",
              "provider": "silo.close"
            },
            {
              "id": "bde49770-322c-11f0-bbb5-9da15d555d80",
              "name": "Send invoice to DIAN",
              "provider": "plemsi"
            },
            {
              "id": "cdf59920-322c-11f0-bbb5-9da15d555d80",
              "name": "Generate PDF",
              "provider": "pdf",
              "summary": "Spanish · Letter",
              "config": {
                "date_format": "%Y-%m-%d",
                "layout": "Letter",
                "locale": "es",
                "logo_height": 40
              }
            },
            {
              "id": "9cebc6a0-322d-11f0-bbb5-9da15d555d80",
              "name": "Set state",
              "provider": "silo.state",
              "summary": "Set state to `sent`{.state .sent}",
              "config": {
                "state": "sent"
              }
            }
          ],
          "rescue": [
            {
              "id": "e57671a0-322c-11f0-bbb5-9da15d555d80",
              "name": "Set state",
              "provider": "silo.state",
              "summary": "Set state to `error`{.state .error}",
              "config": {
                "state": "error"
              }
            }
          ]
        }
        ```

        [Add to my workspace →](https://console.invopop.com/redirect/workflows/new?template=co-dian-invoice)
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="Documents">
    <AccordionGroup>
      <Accordion title="Example B2B invoice">
        In this example, we're issuing a B2B invoice from a Colombian supplier to another Colombian business customer.

        Notice:

        * the `$schema` is set to [`https://gobl.org/draft-0/bill/invoice`](https://docs.gobl.org/draft-0/bill/invoice),
        * the supplier's `tax_id` country is set to `CO`, and the DIAN municipality code is set with the `co-dian-municipality` extension on the party,
        * the customer details include full address, email, and telephone information,
        * the invoice includes VAT at the standard Colombian rate of 19%,
        * payment terms are specified with a due date and payment amount, and,
        * there are no calculations in some fields; these will be made automatically when uploading.

        <CodeGroup>
          ```json DIAN Colombia B2B Invoice theme={"system"}
          {
            "$schema": "https://gobl.org/draft-0/bill/invoice",
            "type": "standard",
            "series": "SETT",
            "code": "1234",
            "issue_date": "2021-01-01",
            "currency": "COP",
            "supplier": {
              "name": "EXAMPLE SUPPLIER S.A.S.",
              "tax_id": {
                "country": "CO",
                "type": "tin",
                "code": "9014514812"
              },
              "ext": {
                "co-dian-municipality": "11001"
              }
            },
            "customer": {
              "name": "EXAMPLE CUSTOMER S.A.S.",
              "tax_id": {
                "country": "CO",
                "type": "tin",
                "code": "9014514805"
              },
              "ext": {
                "co-dian-municipality": "11001"
              },
              "addresses": [
                {
                  "street": "CRA 8 113 31 OF 703",
                  "locality": "Bogotá, D.C.",
                  "region": "Bogotá",
                  "country": "CO"
                }
              ],
              "emails": [
                {
                  "addr": "benito.ortiz@example.com"
                }
              ],
              "telephones": [
                {
                  "num": "3114131811"
                }
              ]
            },
            "lines": [
              {
                "quantity": "1",
                "item": {
                  "name": "Servicios Mes de Julio 2022",
                  "price": "200000.00"
                },
                "taxes": [
                  {
                    "cat": "VAT",
                    "percent": "19%"
                  }
                ]
              }
            ],
            "payment": {
              "terms": {
                "due_dates": [
                  {
                    "date": "2021-01-01",
                    "percent": "100%"
                  }
                ]
              }
            }
          }
          ```

          ```json Built version theme={"system"}
          {
          	"$schema": "https://gobl.org/draft-0/bill/invoice",
          	"$regime": "CO",
          	"type": "standard",
          	"series": "SETT",
          	"code": "1234",
          	"issue_date": "2021-01-01",
          	"currency": "COP",
          	"supplier": {
          		"name": "EXAMPLE SUPPLIER S.A.S.",
          		"tax_id": {
          			"country": "CO",
          			"code": "9014514812",
          			"type": "tin"
          		},
          		"ext": {
          			"co-dian-municipality": "11001"
          		}
          	},
          	"customer": {
          		"name": "EXAMPLE CUSTOMER S.A.S.",
          		"tax_id": {
          			"country": "CO",
          			"code": "9014514805",
          			"type": "tin"
          		},
          		"addresses": [
          			{
          				"street": "CRA 8 113 31 OF 703",
          				"locality": "Bogotá, D.C.",
          				"region": "Bogotá",
          				"country": "CO"
          			}
          		],
          		"emails": [
          			{
          				"addr": "benito.ortiz@example.com"
          			}
          		],
          		"telephones": [
          			{
          				"num": "3114131811"
          			}
          		],
          		"ext": {
          			"co-dian-municipality": "11001"
          		}
          	},
          	"lines": [
          		{
          			"i": 1,
          			"quantity": "1",
          			"item": {
          				"name": "Servicios Mes de Julio 2022",
          				"price": "200000.00"
          			},
          			"sum": "200000.00",
          			"taxes": [
          				{
          					"cat": "VAT",
          					"key": "standard",
          					"percent": "19%"
          				}
          			],
          			"total": "200000.00"
          		}
          	],
          	"payment": {
          		"terms": {
          			"due_dates": [
          				{
          					"date": "2021-01-01",
          					"amount": "238000.00",
          					"percent": "100%"
          				}
          			]
          		}
          	},
          	"totals": {
          		"sum": "200000.00",
          		"total": "200000.00",
          		"taxes": {
          			"categories": [
          				{
          					"code": "VAT",
          					"rates": [
          						{
          							"key": "standard",
          							"base": "200000.00",
          							"percent": "19%",
          							"amount": "38000.00"
          						}
          					],
          					"amount": "38000.00"
          				}
          			],
          			"sum": "38000.00"
          		},
          		"tax": "38000.00",
          		"total_with_tax": "238000.00",
          		"payable": "238000.00"
          	}
          }
          ```
        </CodeGroup>
      </Accordion>

      <Accordion title="Example B2C invoice">
        In this example, we're issuing a B2C simplified invoice from a Colombian supplier to a consumer.

        Notice:

        * we've set the `simplified` tag in the `tax.tags` field; this indicates the invoice is for a final consumer,
        * the customer information is omitted, as it's not required for B2C transactions,
        * the invoice includes a prepayment advance of 100%, meaning the invoice has been fully paid,
        * the totals section shows the `advance` and `due` amounts, with the latter being zero since the invoice is fully paid, and,
        * there are no calculations in some fields; these will be made automatically when uploading.

        <CodeGroup>
          ```json DIAN Colombia B2C Invoice theme={"system"}
          {
            "$schema": "https://gobl.org/draft-0/bill/invoice",
            "type": "standard",
            "series": "SETT",
            "code": "1234",
            "issue_date": "2021-01-01",
            "currency": "COP",
            "tax": {
              "tags": [
                "simplified"
              ]
            },
            "supplier": {
              "name": "EXAMPLE SUPPLIER S.A.S.",
              "tax_id": {
                "country": "CO",
                "type": "tin",
                "code": "9014514812"
              },
              "ext": {
                "co-dian-municipality": "11001"
              }
            },
            "lines": [
              {
                "quantity": "1",
                "item": {
                  "name": "Useful service",
                  "price": "200000.00"
                },
                "taxes": [
                  {
                    "cat": "VAT",
                    "percent": "19%"
                  }
                ]
              }
            ],
            "payment": {
              "advances": [
                {
                  "description": "Prepaid",
                  "percent": "100%"
                }
              ]
            }
          }
          ```

          ```json Built version theme={"system"}
          {
          	"$schema": "https://gobl.org/draft-0/bill/invoice",
          	"$regime": "CO",
          	"$tags": [
          		"simplified"
          	],
          	"type": "standard",
          	"series": "SETT",
          	"code": "1234",
          	"issue_date": "2021-01-01",
          	"currency": "COP",
          	"tax": {},
          	"supplier": {
          		"name": "EXAMPLE SUPPLIER S.A.S.",
          		"tax_id": {
          			"country": "CO",
          			"code": "9014514812",
          			"type": "tin"
          		},
          		"ext": {
          			"co-dian-municipality": "11001"
          		}
          	},
          	"lines": [
          		{
          			"i": 1,
          			"quantity": "1",
          			"item": {
          				"name": "Useful service",
          				"price": "200000.00"
          			},
          			"sum": "200000.00",
          			"taxes": [
          				{
          					"cat": "VAT",
          					"key": "standard",
          					"percent": "19%"
          				}
          			],
          			"total": "200000.00"
          		}
          	],
          	"payment": {
          		"advances": [
          			{
          				"description": "Prepaid",
          				"percent": "100%",
          				"amount": "238000.00"
          			}
          		]
          	},
          	"totals": {
          		"sum": "200000.00",
          		"total": "200000.00",
          		"taxes": {
          			"categories": [
          				{
          					"code": "VAT",
          					"rates": [
          						{
          							"key": "standard",
          							"base": "200000.00",
          							"percent": "19%",
          							"amount": "38000.00"
          						}
          					],
          					"amount": "38000.00"
          				}
          			],
          			"sum": "38000.00"
          		},
          		"tax": "38000.00",
          		"total_with_tax": "238000.00",
          		"payable": "238000.00",
          		"advance": "238000.00",
          		"due": "0.00"
          	}
          }
          ```
        </CodeGroup>
      </Accordion>
    </AccordionGroup>
  </Tab>
</Tabs>

***

<AccordionGroup>
  <Accordion title="🇨🇴 Invopop resources for Colombia">
    |            |                                                                                                                                                                                                                                                   |
    | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | Compliance | <Icon icon="https://assets.invopop.com/flags/co.svg" /> [Invoicing compliance in Colombia](/compliance/colombia)<br /> <Icon icon="timeline" /> [Compliance timeline](/timelines/colombia)                                                        |
    | Apps       | <Icon icon="https://assets.invopop.com/apps/dian-colombia/icon.svg" /> [DIAN Colombia](/apps/dian-colombia)                                                                                                                                       |
    | Guides     | <Icon icon="book" /> [DIAN Guide](/guides/co-dian)                                                                                                                                                                                                |
    | FAQ        | <Icon icon="square-question" /> [Colombia FAQ](/faq/colombia)                                                                                                                                                                                     |
    | GOBL       | <Icon icon="https://assets.invopop.com/icons/gobl.svg" />  [Colombia Tax Regime](https://docs.gobl.org/regimes/co)<br /> <Icon icon="https://assets.invopop.com/icons/gobl.svg" /> [Colombia DIAN Addon](https://docs.gobl.org/addons/co-dian-v2) |
  </Accordion>
</AccordionGroup>

<Card title="Participate in our community" icon="square-question" href="https://community.invopop.com" arrow="true" horizontal>
  Ask and answer questions about DIAN Colombia App →
</Card>
