How it works
There are three provider actions, in theplatforms namespace, plus a SAT-facing portal:
| Step | Action | What it does |
|---|---|---|
| Register | sat-mx.platforms.register | Enrolls a party for platform reporting and produces the portal URL + access credentials. |
| Record | sat-mx.platforms.record | Files a single operation (invoice / CFDI) with the required fields, ready for inspection. |
| Unregister | sat-mx.platforms.unregister | Stops accepting new operations while keeping the portal and its history available. |
Recorded fields
Each recorded operation captures the fields required by rule 2.9.21, section I, extracted automatically from the GOBL document:| # | Field | Source | Required |
|---|---|---|---|
| a | Tipo de servicio (service type) | Distinct line-item descriptions (capped at the first three, with โ+N mรกsโ) | Yes |
| b | RFC del comprador (buyer tax ID) | Customer tax_id.code, when present | When known |
| c | Monto sin IVA (amount before VAT) | Invoice totals | Yes |
| d | IVA (VAT) | Invoice totals | Yes |
| e | Monto con IVA (amount incl. VAT) | Invoice totals | Yes |
| f | Folio fiscal (CFDI UUID) | The SAT stamp (sat-uuid); falls back to the invoice number when there is no CFDI | When available |
| g | Forma de pago (payment method) | The Mexican FormaPago (mx-cfdi-payment-means) when present, otherwise the GOBL payment instruction key | Yes |
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
Register party for platform reporting
Enrolls the party, signs the portal URL, and stores the link + credentials on the party metadata.
- 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
Record operation for reporting
Extracts the rule 2.9.21 fields and files the operation; errors if a required field is missing.
- 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
Unregister party from platform reporting
Stops accepting new operations; preserves portal access and history.
- Template
- Code
SAT unregister platform workflow
Stops accepting new operations for a platform while preserving portal access and history.