How it works
There are three provider actions, in theplatforms namespace, plus a SAT-facing portal:
The typical lifecycle is: register the party once โ record every operation as it happens โ share the portal URL with the SAT. The SAT logs in whenever it needs to inspect the operations. If the party stops reporting, you unregister it; the historical data stays accessible.
Recorded fields
Each recorded operation captures the fields required by rule 2.9.21, section I, extracted automatically from the GOBL document:Fields b and f are conditional in the rule itself โ a sale to pรบblico en general has no buyer RFC, and a non-CFDI operation has no folio fiscal. The recording action only rejects an operation when one of the always-required totals (c, d, e), the service type, or the payment method is missing.
Registering a platform
Runsat-mx.platforms.register against the operatorโs party. It enrolls the party, generates an HMAC-signed portal URL, and writes the link and credentials to the partyโs metadata so you can retrieve and re-share them at any time.
The action returns, and stores on the party:
- URL โ the signed portal address to give to the SAT.
- Usuario โ the operatorโs RFC.
- Secreto โ the access secret (shown so you can share it; re-running register keeps the same secret).
How it works
1
Set state โ processing
Marks the silo entry as โProcessingโ.
2
Sign envelope
Closes (signs) the party envelope so it can be processed.
3
Register party for platform reporting
Enrolls the party, signs the portal URL, and stores the link + credentials on the party metadata.
4
Set state โ registered
Marks the silo entry as โRegisteredโ.
- Template
- Code
SAT register platform workflow
Enrolls a party for digital platform reporting and generates the SAT portal URL and credentials.
Recording operations
Wiresat-mx.platforms.record as the workflow for the bill/invoice documents that flow through the platform. The action resolves the supplier from the invoice, extracts the required fields, and files the operation against that platformโs portal.
Recording is idempotent on the invoice: re-running the workflow for the same document updates the existing row instead of creating a duplicate. If the platform has been unregistered, new operations are rejected.
How it works
1
Set state โ processing
Marks the silo entry as โProcessingโ.
2
Sign envelope
Closes (signs) the invoice envelope so it can be processed.
3
Record operation for reporting
Extracts the rule 2.9.21 fields and files the operation; errors if a required field is missing.
4
Set state โ sent
Marks the silo entry as โSentโ.
- Template
- Code
SAT record operation workflow
Files a single sale through the digital platform portal, ready for SAT inspection.
An operation can only be recorded against a party that has been registered first. The record action resolves the platform from the invoiceโs supplier โ register the supplierโs party before sending it any operations.
The SAT portal
The portal is the SAT-facing side of the feature. It needs no Invopop account: the SAT opens the signed URL from the register step and authenticates with the Usuario (RFC) and Secreto. Once logged in, the SAT sees a paginated table of every recorded operation for that platform, with the fields above, and can:- Filter by buyer RFC and by a date range. Filtering and pagination run server-side, so the table stays fast over very large histories.
- Export to CSV โ the full, filtered result set streams as a download, with no row-count ceiling.
/<owner>/<entry>?sig=<signature> โ the signed portal entry point (login).GET
/<owner>/<entry>/sales โ the filterable, paginated operations table.GET
/<owner>/<entry>/sales.csv โ a streaming CSV export of the current filter.
The session is a short-lived signed cookie; logging out (or letting it expire) returns the SAT to the login screen for the same signed link.
Unregistering
When a party should no longer accept new operations, runsat-mx.platforms.unregister. New record calls are rejected from that point on, but the portal URL and secret keep working so the SAT can still inspect everything filed up to then.
How it works
1
Set state โ processing
Marks the silo entry as โProcessingโ.
2
Unregister party from platform reporting
Stops accepting new operations; preserves portal access and history.
3
Set state โ void
Marks the silo entry as โVoidโ.
- Template
- Code
SAT unregister platform workflow
Stops accepting new operations for a platform while preserving portal access and history.