CFDI 4.0 credit note for a refund on Shopify
When a return, partial refund or discount needs a credit note (CFDI de egreso) in Mexico, what it contains and when to cancel the invoice instead.
In short
A credit note is a CFDI de egreso (an outgoing-type CFDI, Mexico's electronic invoice): it documents a return, a discount or a rebate on a sale you already invoiced, because a CFDI 4.0 can't contain negative amounts. It's related to the original invoice with relationship type 01 and the invoice's folio fiscal (UUID), and it carries the PUE payment method and the same payment form as the invoice. If the sale was in a global invoice (factura global), the credit note goes to the general public and is related to the global invoice. Canceling the invoice is for other cases: a sale that didn't happen or an invoice with errors.
When you refund a Shopify order that already had an invoice, you can't "subtract" the return from that invoice: CFDI 4.0, Mexico's electronic invoice, has no negative amounts. What you need is a credit note (nota de crédito), a CFDI de egreso related to the original invoice.
This guide explains when you need one, what it contains according to the filling guide published by the SAT (Mexico's tax authority), how it relates to a global invoice and when it makes more sense to cancel the invoice instead of issuing a credit note.
What a credit note (CFDI de egreso) is
The SAT's filling guide for Anexo 20 (Guía de llenado, the technical standard for CFDI) classifies CFDIs by type. The egreso type covers returns, discounts and rebates, and can also be used to subtract amounts from an income invoice. The guide adds that this is the document "conocido como nota de crédito": known as a credit note.
It exists because a CFDI 4.0 doesn't allow negative numbers in any field (appendix 7 of the guide, question 2). The original invoice stays valid: the credit note documents what you returned or discounted.
When you need a credit note
| What happened | What to issue |
|---|---|
| You refunded an entire order that already had an invoice | A credit note for the total |
| You refunded part of it: one item, the shipping or an amount | A credit note for what you refunded |
| You gave a discount or a rebate after invoicing | A credit note (appendix 7, question 21) |
| The discount was applied at the time of the sale | None: the discount goes on the same invoice, at the line-item level |
| You refunded an order you haven't invoiced yet | None: there's no invoice to relate it to |
According to the Shopify Help Center, you can refund an entire order or just part of it, shipping included, to the original payment method, to store credit or to both. That refund isn't a tax document: you issue the credit note in your invoicing system.
The SAT's guide has examples of both cases: a credit note for 100% of one or several invoices, and another for part of one (for example, $50.00 of a $200.00 invoice).
What it contains
| Field | What to enter |
|---|---|
| Document type (tipo de comprobante) | E (Egreso) |
| Related CFDI | The folio fiscal (UUID) of the original invoice, with relationship type 01, "Nota de crédito de los documentos relacionados" (credit note for the related documents) |
| Recipient | The same customer as on the original invoice |
| CFDI use (uso del CFDI) | G02, "Devoluciones, descuentos o bonificaciones" (returns, discounts or rebates), if the catalog allows it for your customer's tax regime |
| Payment method | PUE (Pago en una sola exhibición: paid in a single installment) |
| Payment form (forma de pago) | The same as on the original invoice or, if you prefer, the form you're refunding with |
| Line items | The returned products with their codes, or code 84111506 "Servicios de facturación" (billing services) with unit ACT "Actividad" (activity) |
| Amount | What you're refunding, with its IVA (value-added tax) |
A few details from the guide:
- Relationship type. The c_TipoRelacion catalog also has code 03, "Devolución de mercancía sobre facturas o traslados previos" (return of goods on previous invoices or transfers). Ask your accountant which one they prefer for your returns.
- CFDI use. The guide requires the use code to match the recipient's tax regime, according to the "Régimen Fiscal Receptor" column of the c_UsoCFDI catalog.
- Payment form. The guide requires the same code as on the income invoice; using the form you're refunding with is optional. If that invoice hadn't been paid yet, code 15 (Condonación: debt forgiveness) can be used.
- Several invoices. A single credit note can relate several invoices: one UUID for each, and as the amount, the sum of what you return or discount.
If the sale was in a global invoice
If your customer didn't ask for an invoice, their sale went into your global invoice, made out to the general public. The credit note follows the same path. The SAT's filling guide for the global CFDI includes an example of a return:
- Document type E, with relationship type 01 and the global invoice's UUID.
- Recipient XAXX010101000 (the generic RFC, or tax ID, for the general public), tax regime 616 and CFDI use S01, with the postal code of the place of issue.
- PUE payment method, code 84111506 and unit ACT.
If that period's global invoice hadn't been issued yet, the sale doesn't have a CFDI: no credit note is needed. We explain which sales go into the global invoice and when it's issued in CFDI 4.0 global invoice on Shopify.
Credit note or canceling the invoice
- Credit note: the sale did happen, and afterwards there was a return, a discount or a rebate. The invoice stays valid.
- Cancel with reason 03, "No se llevó a cabo la operación" (the transaction didn't take place): according to the SAT, it applies when a transaction that didn't materialize was invoiced. That can be the case for an order you cancel before shipping it.
- Cancel with reason 01 or 02: the invoice has an error. With 01, the invoice that replaces it is issued first.
Before canceling, keep three rules in mind:
- Credit notes first. Rule 2.7.1.34 of the Resolución Miscelánea Fiscal (RMF, the SAT's yearly tax rules) for 2026 requires canceling the CFDIs related to the invoice first, such as its credit notes.
- Your customer's acceptance. Rule 2.7.1.35 lists the cases where it isn't needed; among them, invoices of up to $1,000.00, credit notes, transactions with the general public, customers abroad and cancellations by the business day after the invoice was issued. In all other cases, your customer has three business days to respond; if they don't, the cancellation counts as accepted.
- Deadline. Article 29-A of the Código Fiscal de la Federación (CFF, the Federal Tax Code) allows canceling until the month in which the annual tax return is due for the year in which you issued the invoice.
Common mistakes
- Subtracting the return on the original invoice or entering negative amounts.
- Canceling the invoice because of a partial return: the sale did happen, so a credit note for what was returned is what applies.
- Issuing the credit note without relating it to the invoice's UUID.
- Making the credit note out to the customer when their sale was in the global invoice.
- Using G02 without checking that your customer's tax regime allows it.
- Canceling or replacing an invoice without canceling its credit notes first.
Steps to issue a credit note for a Shopify refund
- Find the invoice. Look up the folio fiscal (UUID) of the order's invoice or, if the sale was in the global invoice, the UUID of that global invoice.
- Check what you refunded. In the Shopify order: which items, how many units, whether you included shipping and the total amount.
- Decide between a credit note and a cancellation. If the sale didn't happen or the invoice has an error, what applies is canceling it with its reason.
- Fill in the details. Type E, relationship 01 with the UUID, the same recipient, a CFDI use allowed for their tax regime, the PUE method and the invoice's payment form.
- Enter the line items. The returned items with their codes, or 84111506 with unit ACT if you're refunding an amount, always with their IVA.
- Stamp it and send it. Stamp it (timbrar) and send your customer the XML and the PDF, as you did with the invoice.
- Keep track of which credit note goes with which order. If you ever cancel or replace the invoice, its credit notes are canceled first.
Frequently asked questions
Does the credit note cancel the original invoice?
No. The invoice stays valid and the credit note subtracts the amount you returned or discounted.
Do I need my customer's acceptance?
Not to issue it. Not to cancel it either: rule 2.7.1.35 of the 2026 RMF allows canceling CFDIs de egreso without the recipient's acceptance.
Which payment form do I use if I refund to store credit?
The SAT's guide requires the same payment form as on the income invoice; using the form you're refunding with is optional. The original invoice's payment form works in every case.
Can I issue a single credit note for several invoices?
Yes. The SAT's guide provides for it: the credit note relates each invoice by its UUID, and its amount is the sum of what you return or discount across all of them.
This article is for information only and doesn't replace advice from your accountant (contador).
About Toldo
Toldo is a Shopify app we build; it's rolling out in stages with a small group of founding partners. When you record a refund in Shopify, partial ones included, for a sale that already has an invoice, Toldo issues the credit note related to that invoice or, if the sale was in a global invoice, to the global invoice; if the global invoice hadn't been issued yet, the sale goes into it at its net amount (Credit notes). A PAC (a stamping provider authorized by the SAT) stamps your invoices with your own CSD (digital seal certificate); Toldo is not a PAC. It charges a flat monthly price, with no per-sale commission. During the rollout, we turn on each feature in stages. If you sell on Mercado Libre and Shopify, you can apply as a founding partner.
Mercado Libre and Shopify are trademarks of their respective owners. Toldo is an independent app; it isn't affiliated with or endorsed by them.
Sources
Accessed on November 16, 2026, unless another date is given.
- SAT, Anexo 20, Guide to filling out CFDIs (Guía de llenado de los comprobantes fiscales digitales por Internet), revision of January 16, 2026 (FormaPago field, CfdiRelacionados node and appendices 2, 5 and 7), read in the copy archived by the Internet Archive on October 31, 2026: https://web.archive.org/web/20261031191642/http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/Anexo_20_Guia_de_llenado_CFDI.pdf
- SAT, Guide to filling out the global CFDI (Guía de llenado del CFDI global), version 4.0 (appendix 2, CFDI de egreso applied to a global CFDI), read in the copy archived by the Internet Archive on January 23, 2026: https://web.archive.org/web/20260123011439/http://omawww.sat.gob.mx/tramitesyservicios/Paginas/documentos/GuiallenadoCFDIglobal311221.pdf
- Resolución Miscelánea Fiscal for 2026, rules 2.7.1.34 and 2.7.1.35 (Diario Oficial de la Federación, DOF, December 28, 2025): https://dof.gob.mx/nota_detalle.php?codigo=5777217&fecha=28/12/2025
- SAT, 2026 cancellation FAQ and scenarios (accessed on November 15, 2026): https://sat.gob.mx/minisitio/Factura/documentos/PreguntasFrecuentes_CancelacionFactura25082026.pdf
- Decree amending the Federal Tax Code, article 29-A (DOF, November 7, 2025): https://dof.gob.mx/nota_detalle.php?codigo=5772358&fecha=07/11/2025
- Shopify Help Center, Refunding orders: https://help.shopify.com/en/manual/fulfillment/managing-orders/refunding-orders