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


Orders and Stock Sync for Bind ERP — stock from Bind, orders into Bind

Facturama CFDI for WooCommerce — CFDI 4.0 invoices from orders for shops in Mexico

Facturapi CFDI for WooCommerce — Mexican electronic invoices from orders
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
- In SW Sapien prepare an account with stamps and load the CSD of your RFC.
- In WooCommerce → CFDI SW Sapien paste the token (or the user and password), enter the seller data and press “Test the connection”.
- Set SAT codes on categories or products and the SAT payment form of each payment method.
- 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
- Plugins → Add New → Upload Plugin: choose the zip and activate it.
- WooCommerce → CFDI SW Sapien: environment, token or user and password, seller data.
- Load the CSD if it is not in your SW account yet, and press “Test the connection”.
- 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.
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.
No reviews yet. Be the first.
No questions yet. Ask one — we answer within 24 hours.
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
Buying the module
—
Charged in UAH; your bank converts it to your currency. EUR price is approximate.




















