Skip to main content

Egress invoice

The fiscal document of type Egreso, or Credit Note, is used to record money outflows for returns, discounts, and bonuses. The main function of this type of document is deductibility, as it is used to correct or subtract amounts from previously issued income documents.

To issue this type of document, you should use the value "E" in the type property when creating the invoice.

When to relate an Egreso document?

When the applied discount is made on a sale that has already been invoiced, the document must be related to one or more Ingreso documents using the corresponding relationship key and the UUID of the Ingreso invoice.

Not a cancellation

It is important to mention that an Egreso document does not serve to cancel an Ingreso document.

Examples

Below are some common use cases.

To fully understand all the available options when creating an invoice, detailed descriptions of each field, and the most commonly used catalogs, please refer to the Create Invoice method reference.

Discount for an already invoiced sale

In this example, a payment of $3,600.00 pesos was received for a product with a 10% discount that has a value of $4,000.00 pesos. The discounted amount of $400.00 pesos is covered by issuing an egress CFDI.

const Facturapi = require('facturapi');
const facturapi = new Facturapi('sk_test_API_KEY');

const invoice = await facturapi.invoices.create({
type: "E",
customer: {
legal_name: 'Dunder Mifflin',
email: 'email@example.com',
tax_id: 'ABC101010111',
tax_system: '601',
address: {
zip: '85900'
}
},
items: [{
product: {
description: 'Descuento',
price: 400,
taxes: [
{
type: 'IVA',
rate: 0.16
}
]
}
}],
payment_form: "28", // "Debit card"
related_documents: [
{
relationship: "01", // SAT code for "Credit note for the related document"
documents: "UUID_DEL_CFDI_DE_INGRESO"
}
]
});

Merchandise return

For this scenario, an Egress invoice is issued for $5,000.00 pesos to cancel the total amount of a previous income CFDI with the same amount.

const Facturapi = require('facturapi');
const facturapi = new Facturapi('sk_test_API_KEY');

const invoice = await facturapi.invoices.create({
type: "E",
customer: {
legal_name: 'Dunder Mifflin',
email: 'email@example.com',
tax_id: 'ABC101010111',
tax_system: '601',
address: {
zip: '85900'
}
},
items: [{
product: {
description: 'Devolución total de mercancía',
price: 5000,
taxes: [
{
type: 'IVA',
rate: 0.16
}
]
}
}],
payment_form: "28", // "Debit card"
related_documents: [
{
relationship: "01", // SAT code for "Credit note for the related document"
documents: "UUID_DEL_CFDI_DE_INGRESO"
}
]
});

Advance Discount on a Future Sale

It is possible to offer discounts on future sales. In this example, an expense CFDI for $400.00 pesos is issued to cover a bonus that will be applied to a sale for $2,000.00 pesos.

const Facturapi = require('facturapi');
const facturapi = new Facturapi('sk_test_API_KEY');

const invoice = await facturapi.invoices.create({
type: "E",
customer: {
legal_name: 'Dunder Mifflin',
email: 'email@example.com',
tax_id: 'ABC101010111',
tax_system: '601',
address: {
zip: '85900'
}
},
items: [{
product: {
description: 'Bonificación a venta futura',
price: 400,
taxes: [
{
type: 'IVA',
rate: 0.16
}
]
}
}],
payment_form: "23" // "Novatión"
});