Black November: −35% on all modules until 30 November Black November: −35% until 30 November Choose a module

Get in touch
WooCommerce

CFDI 4.0 with SW Sapien for WooCommerce — Mexican e-invoices from orders

A button in the order issues a CFDI 4.0 through your SW Sapien account and keeps the UUID, XML and PDF; what still stops the order is listed before you press it.

Download Free
Pro · one-year licence Staging copies are included. The more sites, the cheaper each one
Compatibility
WordPress 6.2+ · WooCommerce 8.0+ · PHP 7.4+ · HPOS · block and classic checkout · English, Español (México)
Licence
a site + a staging copy, annual
Trial
7 days, no card, one per site
Updated
November 2026
Or all 509 Pro modules with All Access — 3 244 UAH / year ≈ €66

What Free has,
and what Pro adds

The free version works with no time limit. Pro adds the rest of the features in the table.

Feature Free Pro
SW Sapien connection: test or production, token or user and password, connection test ✔ ✔
CSD upload into the SW account from the settings ✔ ✔
Seller data, series, SAT codes by product and category, payment forms per payment method ✔ ✔
IVA 16, 8 and 0 %, IEPS, lines without tax, coupons as the line discount ✔ ✔
CFDI box in the order: buyer data or general public, list of what stops the invoice, issue button ✔ ✔
Duplicate protection on retries (folio, date and customid) ✔ ✔
UUID, status, XML and PDF in the order ✔ ✔
Another currency with the FIX rate ✔ ✔
"I need an invoice" fields at classic and block checkout — ✔
Automatic issuing by status with background retries — ✔
Buyer self-invoicing from the order page, guest through a link — ✔
XML and PDF e-mailed to the buyer, with a resend button — ✔
Cancellation with motive 01–04 and SAT status tracking — ✔
Credit notes (type E) for refunds, by hand or automatic — ✔
PPD for an unpaid order and the Pagos 2.0 payment complement — ✔
Global invoice of a period — ✔
Bulk issuing from the orders list — ✔
Report and CSV of a period — ✔
Licence with a 7-day trial and updates from the admin — ✔

What it looks like

Connection to SW Sapien
WooCommerce → CFDI SW Sapien: environment, token or user, connection test with the stamps left and the CSD.
The CFDI box in the order
Order: folio fiscal, series and folio, receiver, total, PDF and XML.
Invoice fields at checkout (Pro)
Checkout: “I need an invoice”, RFC, postal code, name, regime and CFDI use.

Key points

What the free version does

The settings are in WooCommerce → CFDI SW Sapien.

What Pro adds

“I need an invoice” fields at checkout, classic and block: RFC, fiscal name, regime, CFDI use and postal code, checked before the order is placed.

How much it costs

The base version is free. Pro costs 1290 UAH for a one-year licence. A year of updates, technical support and all Pro features.

The trial starts when you ask

A fresh install is the free version, nothing switches on by itself. The “Try Pro for 7 days” button → e-mail → the key right in the window and by e-mail.

One key — a site and a staging copy

Moving the site? Unlink the licence on the old domain and activate it on the new one yourself. A staging copy (staging., dev.) works with the same key and does not take a site slot. For studios — keys for 5 or 25 sites, or unlimited.

Technical requirements

  • WordPress 6.2+, WooCommerce 8.0+, PHP 7.4+.
  • An SW Sapien account with stamps and the CSD of your RFC.
  • Shop currency MXN; other currencies are issued with the FIX rate the administrator enters.

Version history

v1.0.0 Current November 2026

CFDI 4.0 from an order through SW Sapien, connection test with stamps and CSD, CSD upload, SAT codes by product and category, a list of what stops the invoice, UUID, PDF and XML, English…

Frequently bought with CFDI 4.0 with SW Sapien

All Access Need more? All modules (509) under one licence, new ones are added automatically. 3 244 UAH≈ €66 Learn more →

Full module description

CFDI 4.0 with SW Sapien for WooCommerce builds a Mexican e-invoice (CFDI 4.0) from the order and stamps it through your SW Sapien account, a PAC authorised by the SAT. SW seals the document with the CSD of your RFC, and the order keeps the folio fiscal (UUID), the XML and the PDF. You work with your own SW account, in the test or the production environment. The administrator types the buyer’s RFC, name, regime, CFDI use and postal code, or invoices the general public; the order box says in plain words what is still missing. The module works with HPOS; the interface is in English and Spanish (Mexico).

What the free version does

The settings are in WooCommerce → CFDI SW Sapien. Choose the environment, paste the infinite token of the SW stamp manager (ADT) or enter a user and password (the module then gets a 2-hour token and renews it by itself) and press “Test the connection”: it shows the stamps left and whether a valid CSD of the seller’s RFC is loaded. The CSD (.cer, .key and password) can be loaded into your SW account straight from the settings; the files are not kept on the site. Then the seller data (RFC, name, regime, postal code of the place of issue), the series, default SAT codes, codes on the product and on the category, the SAT payment form of each payment method, IVA 16, 8 and 0 %, IEPS when the tax rate is named so, and your choice for lines without tax (rate 0, exempt or no object of tax). Coupons go as the line’s discount, shipping and fees as their own lines. The order gets a “CFDI (SW Sapien)” box: the buyer fields, a list of what stops the invoice, and one “Issue CFDI” button for a paid order. Against duplicates, the folio, the date and an idempotency key (the customid header) are fixed before the first call and kept on every retry, so a lost answer never makes a second invoice. Another currency is issued with the FIX rate you enter in the order.

What Pro adds

“I need an invoice” fields at checkout, classic and block: RFC, fiscal name, regime, CFDI use and postal code, checked before the order is placed. Automatic issuing at the order status you choose, for orders with the buyer’s data or for all; a lost answer is retried in the background with the same key. Self-invoicing: the buyer requests the CFDI from the order page, a guest through the order link, and downloads the PDF and XML there. SW e-mails the XML and PDF to the buyer when the CFDI is stamped, and a button sends it again. Cancellation with the SAT motive (01 with the replacement folio, 02, 03, 04), with the status at the SAT followed every hour while the receiver has to accept. Credit notes (CFDI type E, related to the invoice) for WooCommerce refunds, by line or for an amount, by hand or automatically. Payment deferred (PPD): an unpaid order (bank transfer, OXXO) is invoiced as PPD, and the payment complement (Pagos 2.0) is issued by itself when the order is paid. The global invoice of a period for sales without a CFDI of their own, one line per sale. Bulk issuing from the orders list, in the background. A report of a period on screen and as a CSV for your accountant. A licence with a 7-day trial and updates from the admin.

Good to know before you start

  • You need an SW Sapien account with stamps and the CSD of your RFC loaded. SW stamps and fees are separate from the module. SW test and production are separate accounts: a token or user of one does not work in the other.
  • Not included: Carta Porte, the foreign trade complement, withholdings (IVA or ISR retained) and payroll.
  • An invoice with the foreign generic RFC XEXX010101000 is not supported. A negative fee cannot be a CFDI line: use coupons for discounts.
  • The payment complement is issued for MXN and one payment of the full order amount; other cases, partial payment refunds included, are issued in the SW portal.
  • The invoice is issued with the payment method PUE for a paid order; you choose the SAT payment form of each payment method yourself, because a method id does not say whether it was a card or a transfer.
  • If an answer from SW got lost and nobody retried for more than 70 hours, the duplicate protection no longer applies: the module then does not send by itself, it asks you to check the SW portal and only then press the button again.
  • The XML of issued CFDI is kept in the order data, and the XML of global invoices in the site options; for very large global invoices that is hundreds of kilobytes.
  • This is not tax advice: agree on SAT codes, rates and regime with your accountant. The module is independent, is not a product of SW Sapien and is not affiliated with SW.

How it works, step by step

  1. In SW Sapien prepare an account with stamps and load the CSD of your RFC.
  2. In WooCommerce → CFDI SW Sapien paste the token (or the user and password), enter the seller data and press “Test the connection”.
  3. Set SAT codes on categories or products and the SAT payment form of each payment method.
  4. In the order enter the buyer’s data (or leave the RFC empty for the general public) and press “Issue CFDI”. In Pro turn on the checkout fields and automatic issuing.

Under the hood

  • Sign-in with the infinite ADT token or with a user and password (a 2-hour token in the cache, renewed on 401); calls to the SW API: JSON stamping, cancellation, XML, PDF, stamp balance, certificates.
  • The token, password and keys are stored encrypted with the keys of your wp-config.php; the site does not keep the CSD files.
  • Against duplicates the folio, the date and the customid are fixed before the first call; an answer that the CFDI is already stamped is read as the same document.
  • Pro: background retries and bulk issuing through Action Scheduler, an hourly poll of the cancellation status at the SAT.
  • Works with HPOS, classic and block checkout; languages: English, Español (México).

How to install

  1. Plugins → Add New → Upload Plugin: choose the zip and activate it.
  2. WooCommerce → CFDI SW Sapien: environment, token or user and password, seller data.
  3. Load the CSD if it is not in your SW account yet, and press “Test the connection”.
  4. Open a paid order, enter the buyer’s data and issue the first CFDI.

The module is not on wordpress.org yet: the free version and Pro are one archive from this page; without a key it works as the free version. A separate archive with the free version only is also available.

Questions
about the module

Didn't find the answer? Message us on Telegram and we'll reply within a business day.

@catcode_support Setup, compatibility, activation
Is this the official SW Sapien plugin?

No. It is an independent integration by CatCode; SW Sapien is a product of SW Smarter Web.

Do I need a separate SW account?

Yes, the module works with your own SW account: in the test environment for trial documents without fiscal validity, and in production for real CFDI.

Token or user and password?

The infinite token of the SW stamp manager does not expire until you regenerate it. With a user and password the module gets a two-hour token and renews it by itself.

Where do the CSD certificates go?

Into your SW account, once: from the module settings or in the SW stamp manager. The files and the password are not kept on the site.

Can I cancel a CFDI?

In your SW account, always. From the order, with a SAT motive and status tracking, in Pro.

What happens to orders created before the install?

Nothing until you issue a CFDI for them from the order screen.

What happens after the trial?

Pro switches off, the free part keeps working.

Not quite what you are looking for?

We build custom modules for WordPress, WooCommerce, OpenCart and Shopify. Tell us about the task and we'll prepare an estimate.

Order a custom module