Facturación CFDI documentation
The app's admin interface is in Spanish; labels below are quoted as they appear in the app, with a translation in parentheses.
Contents: Setup · CSD · Manual invoice · Self-invoice portal · Theme block · Refunds and credit notes · Cancellations · Global invoice · Plans and limits · Test mode · Privacy · Support
1. Setup
- Install the app from Shopify. You sign in with your Shopify account; there is no separate login.
- Open Plan and choose a plan. Every plan has a 7-day trial. Individual invoices cannot be stamped without an active plan.
- Open Emisor (Issuer) and enter your tax details and CSD (next section).
- Review Claves SAT (SAT keys): each product needs a SAT product/service key and unit key. The app suggests keys (AI-assisted) and you review or change them before stamping. Without a key, the generic 01010101 / H87 is used.
- In Configuración (screen Autofactura y factura global) enable the self-invoice portal, its deadline and the automatic global invoice if you use them.
On Inicio (Home) the badge Emisor listo (Issuer ready) appears when the issuer is complete.
2. Uploading the CSD (digital seal certificate)
You obtain the CSD from the SAT portal; it is not the e.firma. In Emisor enter:
- RFC, Razón social (legal name as on your tax status certificate), Régimen fiscal (tax regime) and Código postal (tax address ZIP code).
- Certificado .cer, Llave .key (no se guarda) (key file, not stored) and Contraseña de la llave (no se guarda) (key password, not stored). Optional logo (PNG or JPG) for the PDF.
Click Guardar emisor (Save issuer). The .key file and password are sent encrypted directly to the authorized PAC and are never stored in our database or logs. The certificate expiry date is shown; renew it before it expires.
3. Manual invoice from an order
- When an order is paid it appears under Pedidos (Orders, Pedidos facturables).
- Click Facturar (Invoice) on the order. Enter receiver RFC, legal name, email, ZIP code, tax regime, CFDI use and payment form. For non-MXN orders enter the exchange rate.
- Click Timbrar CFDI (Stamp CFDI). RFC, regime, ZIP code and CFDI use are validated first. If the PAC rejects it you see the reason and a Reintentar timbrado (Retry) button.
- The invoice appears under Facturas (Invoices), where you can download PDF and XML, email it and verify it with the SAT.
Clicking twice never creates a duplicate: each order is stamped only once.
4. Self-invoice portal for customers
Enable it in Configuración → Activar portal público /apps/factura. Customers go to https://your-store/apps/factura, enter the Número de pedido (order number) and the order email, click Buscar pedido (Find order) and enter their tax details. They receive the PDF and XML.
- Deadline: customers can invoice within the calendar month of the purchase plus the extra days you configure (Días extra de plazo).
- Only orders matching both number and email are shown, with attempt limits to prevent abuse.
- An order included in the global invoice can no longer be self-invoiced.
5. "Facturar mi compra" theme block
In the app, open Configuración and click Agregar bloque en el editor de temas: the theme editor opens with the app block Facturar mi compra already added. Adjust its texts and click Save. You can also add it from Online Store → Themes → Customize → Add block → Apps. It works on Online Store 2.0 themes without editing theme code and is removed when the app is uninstalled. Optionally, Configuración provides an HTML link for the Order confirmation email notification.
6. Refunds and credit notes
- When an invoiced order is refunded (fully or partially), the app flags that it needs a credit note.
- Manual: under Facturas open the invoice; in Nota de crédito (CFDI tipo E) enter the Importe a devolver (amount to refund) and click Emitir nota de crédito (Issue credit note).
- Automatic: in Configuración enable automatic credit notes on refunds of individual invoices.
- The credit note is related (type 01) to the original invoice UUID. If the order was in a global invoice, the credit note is issued to PÚBLICO EN GENERAL related to the global invoice. Credit notes can never exceed the invoiced total.
7. Cancellations
Under Facturas open a stamped invoice; in Cancelar CFDI (motivos SAT 01–04) choose the reason and click Cancelar factura (Cancel invoice):
- 01 — Errors with relation (requires the UUID or ID of the replacing invoice).
- 02 — Errors without relation.
- 03 — Transaction not carried out.
- 04 — Nominative transaction related to a global invoice (requires replacement).
If the SAT requires the receiver's acceptance, the status stays Cancelación pendiente (Cancellation pending) until they respond. Cancelling is free.
8. Monthly global invoice
Sales your customers did not invoice go into a global invoice to PÚBLICO EN GENERAL (RFC XAXX010101000, regime 616, use S01, monthly periodicity); each order is one line item.
- Automatic: in Configuración enable Generar factura global automática al cerrar el plazo. It is generated when the month's self-invoice deadline passes.
- Manual: in Configuración → Factura global mensual choose Año (year) and Mes (month) and click Generar factura global.
- No duplicates: there is one global invoice per month.
9. Plans and limits
See pricing. Individual invoices, credit notes and global invoices count; cancellations do not. Invoices beyond the included amount are charged at the plan's additional price, up to a monthly cap. If you reach the cap you keep stamping and the Plan page asks you to approve a higher cap. Plan shows the month's usage and charges.
10. Test mode
While the badge on Inicio reads Modo de pruebas (test mode), invoices are stamped in the test environment: they are not sent to the SAT and have no tax validity. To test you can use the SAT's public test CSD: RFC EKU9003173C9 (ESCUELA KEMPER URGATE, regime 601, ZIP 42501), .cer certificate, .key file, password 12345678a. Contact us to switch to production.
11. Privacy and data
- Data processed: order data (line items, amounts, taxes, customer email) and the receiver's tax data (RFC, legal name, regime, ZIP code, CFDI use).
- Shared with the authorized PAC for stamping; the SAT receives the stamped CFDI.
- CFDIs and their tax data are kept for the period required by tax law. On a customer redaction request (Shopify webhook) the customer's email is removed; CFDI tax data is kept as legally required.
- The CSD .key and password are not stored. Each store's stamping credentials are stored encrypted.
- On uninstall, store data is deleted via the
shop/redactwebhook, except what must be kept by law.
See the Privacy Policy.
12. Support
Email soporte@stocklinelabs.website with your store domain and, if relevant, the order number or UUID. We answer on business days, in Spanish or English. Never email your .key file or its password.
FAQ
Do I need a PAC contract?
No. Stamps are included in your plan and stamping is certified with the SAT by an authorized PAC.
Can I invoice orders in US dollars?
Yes; enter the exchange rate when stamping.
What if my CSD expires?
The PAC will reject stamping. Upload the new CSD in Emisor.
Can I invoice an order that is already in the global invoice?
No. The sale is already covered by that month's global invoice and the app blocks an individual invoice to avoid double-reporting the income.