Docs

Exac for developers

Mexican invoicing and CFDI infrastructure for developers and AI agents

Issue invoices, synchronize SAT data, and run Mexican business workflows through REST or MCP using one organization-scoped contract.

Production and sandbox

Organization API keys are bound to one environment. Sandbox keys use the operations marked “Production and sandbox” in the API reference against isolated test data. Production-only operations and MCP remain unavailable in sandbox. Credentials are rejected outside their assigned environment.

Quickstart

Make your first authenticated request

Start with an isolated sandbox organization and a sandbox API key.

  1. 1
    Open the developer console

    Open /consola from Exac, select Test, and open API keys for your current workspace.

  2. 2
    Create a sandbox API key

    Create a key for Test and copy it once. Exac prepares the isolated environment automatically.

  3. 3
    Verify the sandbox organization

    Call GET /v1/organization with the sandbox key against the sandbox server shown in OpenAPI.

  4. 4
    Run a Test workflow

    Create a contact and CFDI draft, then create, retrieve, and cancel a test stamp. Sandbox artifacts are not submitted to SAT and have no fiscal validity.

curl "https://grateful-squid-667.convex.site/v1/organization" \  --header "Authorization: Bearer <EXAC_API_KEY>"

First API paths

Canonical workflows

Use the same domain intent through REST or MCP. These examples are validated against the runtime contracts; replace example identifiers and credentials with values from your organization.

01Test a CFDI lifecycle in sandboxCreate, stamp, download, and cancel a non-fiscal test CFDI using only sandbox REST operations.
  1. 1

    Verify the organization

    Confirm that the sandbox key resolves to the expected isolated organization.

    REST · Production and sandboxGET /v1/organization

    Retry guidance: This read is safe to repeat.

  2. 2

    Create a test customer

    Create the customer referenced by the test CFDI.

    REST · Production and sandboxPOST /v1/contacts

    Retry guidance: Reuse the same key only for an identical request.

  3. 3

    Create a CFDI draft

    Create a draft that can be reviewed before the explicit test stamp.

    REST · Production and sandboxPOST /v1/cfdis

    Retry guidance: Reuse the same key only for the identical draft payload.

  4. 4

    Create a test stamp

    Sandbox creates a test artifact. It is not submitted to SAT and has no fiscal validity.

    REST · Production and sandboxPOST /v1/cfdis/cfdi:invoice-example/stamp

    Retry guidance: Retry only with the same key and documentRef.

  5. 5

    Download the test PDF

    Download the generated test document from the sandbox receiver.

    REST · Production and sandboxGET /v1/documents/cfdi:invoice-example/files/pdf

    Retry guidance: This file read is safe to repeat.

  6. 6

    Cancel the test CFDI

    Exercise the cancellation transition against isolated test data.

    REST · Production and sandboxPOST /v1/cfdis/cfdi:invoice-example/cancel

    Retry guidance: Reuse the same key only for the same cancellation request.

{  "steps": [    {      "id": "verify-sandbox-organization",      "rest": {        "operationId": "getOrganization",        "method": "GET",        "path": "/v1/organization",        "environments": [          "production",          "sandbox"        ]      }    },    {      "id": "create-sandbox-contact",      "rest": {        "operationId": "createContact",        "method": "POST",        "path": "/v1/contacts",        "environments": [          "production",          "sandbox"        ],        "headers": {          "Idempotency-Key": "sandbox-create-contact"        },        "body": {          "kind": "customer",          "legalName": "Estudio Jacaranda",          "email": "administracion@jacaranda.example"        }      }    },    {      "id": "create-sandbox-cfdi",      "rest": {        "operationId": "createCfdiDraft",        "method": "POST",        "path": "/v1/cfdis",        "environments": [          "production",          "sandbox"        ],        "headers": {          "Idempotency-Key": "sandbox-create-cfdi"        },        "body": {          "customerId": "customer-example",          "items": [            {              "kind": "custom",              "description": "Consultoría administrativa · julio 2026",              "quantity": 1,              "unitPrice": 10000,              "satProductCode": "84111506",              "satUnitCode": "E48",              "taxRate": 0.16,              "taxability": "standard"            }          ],          "kind": "income",          "cfdiUse": "G03",          "payment": {            "timing": "deferred_or_installments",            "formCode": "99",            "conditions": "Crédito a 30 días"          }        }      }    },    {      "id": "stamp-sandbox-cfdi",      "rest": {        "operationId": "stampCfdi",        "method": "POST",        "path": "/v1/cfdis/cfdi:invoice-example/stamp",        "environments": [          "production",          "sandbox"        ],        "headers": {          "Idempotency-Key": "sandbox-stamp-cfdi"        },        "body": {}      }    },    {      "id": "download-sandbox-pdf",      "rest": {        "operationId": "downloadDocumentFile",        "method": "GET",        "path": "/v1/documents/cfdi:invoice-example/files/pdf",        "environments": [          "production",          "sandbox"        ]      }    },    {      "id": "cancel-sandbox-cfdi",      "rest": {        "operationId": "cancelCfdi",        "method": "POST",        "path": "/v1/cfdis/cfdi:invoice-example/cancel",        "environments": [          "production",          "sandbox"        ],        "headers": {          "Idempotency-Key": "sandbox-cancel-cfdi"        },        "body": {          "reason": "02"        }      }    }  ]}
02Configure fiscal accessSet the organization fiscal identity, upload its CSD, and verify readiness before creating CFDIs.
  1. 1

    Set the fiscal identity

    Update one organization settings section at a time.

    REST · Production onlyPATCH /v1/organizationMCP · Production onlyupdate_organization

    Retry guidance: Reuse the same Idempotency-Key only for the exact same section payload.

  2. 2

    Upload the CSD pair

    Upload the certificate and private key as base64; secret material is never returned.

    REST · Production onlyPUT /v1/organization/certificates/csd

    Retry guidance: Retry with the same key and unchanged certificate payload.

  3. 3

    Verify readiness

    Read the organization projection and confirm fiscal readiness before issuing.

    REST · Production and sandboxGET /v1/organizationMCP · Production onlyget_organization

    Retry guidance: Reads are safe to repeat; do not add an idempotency key.

{  "steps": [    {      "id": "update-fiscal-settings",      "rest": {        "operationId": "updateOrganization",        "method": "PATCH",        "path": "/v1/organization",        "environments": [          "production"        ],        "headers": {          "Idempotency-Key": "workflow-fiscal-settings"        },        "body": {          "section": "fiscal",          "legalName": "Empresa Ejemplo SA de CV",          "rfc": "XAXX010101000",          "taxSystem": "601",          "address": {            "postalCode": "82110"          }        }      },      "mcp": {        "tool": "update_organization",        "arguments": {          "idempotencyKey": "workflow-fiscal-settings",          "input": {            "section": "fiscal",            "legalName": "Empresa Ejemplo SA de CV",            "rfc": "XAXX010101000",            "taxSystem": "601",            "address": {              "postalCode": "82110"            }          }        },        "environments": [          "production"        ]      }    },    {      "id": "upload-csd",      "rest": {        "operationId": "uploadCertificate",        "method": "PUT",        "path": "/v1/organization/certificates/csd",        "environments": [          "production"        ],        "headers": {          "Idempotency-Key": "workflow-upload-csd"        },        "body": {          "certificateBase64": "BASE64_CER",          "privateKeyBase64": "BASE64_KEY",          "password": "certificate-password",          "certificateFileName": "certificate.cer",          "privateKeyFileName": "private.key"        }      }    },    {      "id": "verify-organization",      "rest": {        "operationId": "getOrganization",        "method": "GET",        "path": "/v1/organization",        "environments": [          "production",          "sandbox"        ]      },      "mcp": {        "tool": "get_organization",        "arguments": {},        "environments": [          "production"        ]      }    }  ]}
03Issue and send a production CFDIProduction workflow: create a draft, inspect it, explicitly stamp it with SAT, then send the resulting document.
  1. 1

    Create the draft

    Creation is draft-only. It does not stamp or send the CFDI; inspect the returned draft before either explicit transition.

    REST · Production and sandboxPOST /v1/cfdisMCP · Production onlycreate_cfdi_draft

    Retry guidance: Use the same key for an exact retry; a changed payload is a new request.

  2. 2

    Inspect the draft

    Use the returned documentRef to review the canonical document projection.

    REST · Production and sandboxGET /v1/cfdis/cfdi:invoice-exampleMCP · Production onlyget_document

    Retry guidance: This read is safe to repeat and has no idempotency key.

  3. 3

    Preview the draft PDF (optional)

    Use preview_pdf to inspect the rendered document before stamping. The preview has no fiscal validity.

    REST · Production and sandboxGET /v1/documents/cfdi:invoice-example/files/preview_pdfMCP · Production onlyget_document_file

    Retry guidance: This file read is safe to repeat and has no idempotency key.

  4. 4

    Stamp with SAT

    Stamping is a separate irreversible transition. Review the draft first.

    REST · Production and sandboxPOST /v1/cfdis/cfdi:invoice-example/stampMCP · Production onlystamp_cfdi

    Retry guidance: Retry only with the same key and documentRef; provider failures may require recovery.

  5. 5

    Send the CFDI

    Email the stamped CFDI and its fiscal files to an explicit recipient.

    REST · Production onlyPOST /v1/documents/cfdi:invoice-example/sendMCP · Production onlysend_document

    Retry guidance: Reuse the key for the same recipient and document; sending remains an external side effect.

{  "steps": [    {      "id": "create-cfdi-draft",      "rest": {        "operationId": "createCfdiDraft",        "method": "POST",        "path": "/v1/cfdis",        "environments": [          "production",          "sandbox"        ],        "headers": {          "Idempotency-Key": "workflow-create-cfdi"        },        "body": {          "customerId": "customer-example",          "items": [            {              "kind": "custom",              "description": "Consultoría administrativa · julio 2026",              "quantity": 1,              "unitPrice": 10000,              "satProductCode": "84111506",              "satUnitCode": "E48",              "taxRate": 0.16,              "taxability": "standard"            }          ],          "kind": "income",          "cfdiUse": "G03",          "payment": {            "timing": "deferred_or_installments",            "formCode": "99",            "conditions": "Crédito a 30 días"          }        }      },      "mcp": {        "tool": "create_cfdi_draft",        "arguments": {          "idempotencyKey": "workflow-create-cfdi",          "input": {            "customerId": "customer-example",            "items": [              {                "kind": "custom",                "description": "Consultoría administrativa · julio 2026",                "quantity": 1,                "unitPrice": 10000,                "satProductCode": "84111506",                "satUnitCode": "E48",                "taxRate": 0.16,                "taxability": "standard"              }            ],            "kind": "income",            "cfdiUse": "G03",            "payment": {              "timing": "deferred_or_installments",              "formCode": "99",              "conditions": "Crédito a 30 días"            }          }        },        "environments": [          "production"        ]      }    },    {      "id": "inspect-cfdi-draft",      "rest": {        "operationId": "getCfdi",        "method": "GET",        "path": "/v1/cfdis/cfdi:invoice-example",        "environments": [          "production",          "sandbox"        ]      },      "mcp": {        "tool": "get_document",        "arguments": {          "documentRef": "cfdi:invoice-example"        },        "environments": [          "production"        ]      }    },    {      "id": "preview-cfdi-draft-pdf",      "rest": {        "operationId": "downloadDocumentFile",        "method": "GET",        "path": "/v1/documents/cfdi:invoice-example/files/preview_pdf",        "environments": [          "production",          "sandbox"        ]      },      "mcp": {        "tool": "get_document_file",        "arguments": {          "documentRef": "cfdi:invoice-example",          "file": "preview_pdf"        },        "environments": [          "production"        ]      }    },    {      "id": "stamp-cfdi",      "rest": {        "operationId": "stampCfdi",        "method": "POST",        "path": "/v1/cfdis/cfdi:invoice-example/stamp",        "environments": [          "production",          "sandbox"        ],        "headers": {          "Idempotency-Key": "workflow-stamp-cfdi"        },        "body": {}      },      "mcp": {        "tool": "stamp_cfdi",        "arguments": {          "documentRef": "cfdi:invoice-example",          "idempotencyKey": "workflow-stamp-cfdi"        },        "environments": [          "production"        ]      }    },    {      "id": "send-cfdi",      "rest": {        "operationId": "sendDocument",        "method": "POST",        "path": "/v1/documents/cfdi:invoice-example/send",        "environments": [          "production"        ],        "headers": {          "Idempotency-Key": "workflow-send-cfdi"        },        "body": {          "recipient": "administracion@jacaranda.example"        }      },      "mcp": {        "tool": "send_document",        "arguments": {          "idempotencyKey": "workflow-send-cfdi",          "input": {            "documentRef": "cfdi:invoice-example",            "recipient": "administracion@jacaranda.example"          }        },        "environments": [          "production"        ]      }    }  ]}
04Create a payment complementRecord one or more payments against a PPD invoice. Exac distributes the known invoice taxes across each partial payment.
  1. 1

    Inspect the related CFDI

    Use taxes: "auto" when Exac has the stamped invoice. For an unknown external invoice, send its SAT taxObject and payment-level tax rows; no XML import is required.

    REST · Production and sandboxGET /v1/cfdis/cfdi:invoice-exampleMCP · Production onlyget_document

    Retry guidance: This read is safe to repeat.

  2. 2

    Create the payment-complement draft

    For the first payment use installment 1 and the invoice total as previousBalance. For later payments, increment installment and use the preceding remaining balance. Exac resolves automatic taxes before creating the draft.

    REST · Production and sandboxPOST /v1/cfdisMCP · Production onlycreate_cfdi_draft

    Retry guidance: Reuse the same key only for the identical payment.

  3. 3

    Inspect before stamping

    Confirm balances, installment, and payment taxes in the canonical draft projection.

    REST · Production and sandboxGET /v1/cfdis/cfdi:payment-exampleMCP · Production onlyget_document

    Retry guidance: This read is safe to repeat.

  4. 4

    Stamp the payment complement

    Stamp only after the related UUID, installment, previous, paid, remaining balances, and proportional taxes are correct.

    REST · Production and sandboxPOST /v1/cfdis/cfdi:payment-example/stampMCP · Production onlystamp_cfdi

    Retry guidance: Reuse the same key only for the same reviewed draft and emission date.

{  "steps": [    {      "id": "inspect-related-cfdi",      "rest": {        "operationId": "getCfdi",        "method": "GET",        "path": "/v1/cfdis/cfdi:invoice-example",        "environments": [          "production",          "sandbox"        ]      },      "mcp": {        "tool": "get_document",        "arguments": {          "documentRef": "cfdi:invoice-example"        },        "environments": [          "production"        ]      }    },    {      "id": "create-payment-complement-draft",      "rest": {        "operationId": "createCfdiDraft",        "method": "POST",        "path": "/v1/cfdis",        "environments": [          "production",          "sandbox"        ],        "headers": {          "Idempotency-Key": "workflow-create-payment-complement"        },        "body": {          "kind": "payment_complement",          "customerId": "customer-example",          "payment": {            "formCode": "03",            "paidLocalDateTime": "2026-07-15T12:00:00",            "documents": [              {                "uuid": "00000000-0000-4000-8000-000000000001",                "amount": 11600,                "installment": 1,                "previousBalance": 11600,                "taxes": "auto"              }            ]          }        }      },      "mcp": {        "tool": "create_cfdi_draft",        "arguments": {          "idempotencyKey": "workflow-create-payment-complement",          "input": {            "kind": "payment_complement",            "customerId": "customer-example",            "payment": {              "formCode": "03",              "paidLocalDateTime": "2026-07-15T12:00:00",              "documents": [                {                  "uuid": "00000000-0000-4000-8000-000000000001",                  "amount": 11600,                  "installment": 1,                  "previousBalance": 11600,                  "taxes": "auto"                }              ]            }          }        },        "environments": [          "production"        ]      }    },    {      "id": "inspect-payment-complement-draft",      "rest": {        "operationId": "getCfdi",        "method": "GET",        "path": "/v1/cfdis/cfdi:payment-example",        "environments": [          "production",          "sandbox"        ]      },      "mcp": {        "tool": "get_document",        "arguments": {          "documentRef": "cfdi:payment-example"        },        "environments": [          "production"        ]      }    },    {      "id": "stamp-payment-complement",      "rest": {        "operationId": "stampCfdi",        "method": "POST",        "path": "/v1/cfdis/cfdi:payment-example/stamp",        "environments": [          "production",          "sandbox"        ],        "headers": {          "Idempotency-Key": "workflow-stamp-payment-complement"        },        "body": {}      },      "mcp": {        "tool": "stamp_cfdi",        "arguments": {          "documentRef": "cfdi:payment-example",          "idempotencyKey": "workflow-stamp-payment-complement"        },        "environments": [          "production"        ]      }    }  ]}
05Convert receipts into a CFDICreate one CFDI draft from selected receipt sales. Stamping remains a separate explicit operation.
  1. 1

    Create an invoiceable receipt

    Set invoiceRequested: true to snapshot the product SAT identity and tax treatment at sale time. It is optional for receipts that will never be invoiced.

    REST · Production and sandboxPOST /v1/sales-receiptsMCP · Production onlycreate_sales_receipt

    Retry guidance: Reuse the same key only for the identical sale.

  2. 2

    Convert the receipts

    The operation validates receipt ownership and reconciliation, then returns a CFDI draft. It does not stamp or send the CFDI.

    REST · Production and sandboxPOST /v1/cfdis/from-sales-receiptsMCP · Production onlycreate_cfdi_draft_from_sales_receipts

    Retry guidance: Retry the exact receipt set with the same key; never change the set under an existing key.

  3. 3

    Read the resulting CFDI

    Use the CFDI documentRef returned by the conversion to retrieve the canonical detail.

    REST · Production and sandboxGET /v1/cfdis/cfdi:invoice-exampleMCP · Production onlyget_document

    Retry guidance: Reads are safe to repeat and do not need an idempotency key.

{  "steps": [    {      "id": "create-invoiceable-receipt",      "rest": {        "operationId": "createSalesReceipt",        "method": "POST",        "path": "/v1/sales-receipts",        "environments": [          "production",          "sandbox"        ],        "headers": {          "Idempotency-Key": "workflow-create-invoiceable-receipt"        },        "body": {          "saleType": "paid",          "customer": {            "kind": "stored",            "customerId": "customer-example"          },          "items": [            {              "productId": "product-example",              "description": "Servicio",              "quantity": 1,              "unitPrice": 1250            }          ],          "paymentForm": "03",          "invoiceRequested": true        }      },      "mcp": {        "tool": "create_sales_receipt",        "arguments": {          "idempotencyKey": "workflow-create-invoiceable-receipt",          "input": {            "saleType": "paid",            "customer": {              "kind": "stored",              "customerId": "customer-example"            },            "items": [              {                "productId": "product-example",                "description": "Servicio",                "quantity": 1,                "unitPrice": 1250              }            ],            "paymentForm": "03",            "invoiceRequested": true          }        },        "environments": [          "production"        ]      }    },    {      "id": "create-cfdi-from-receipts",      "rest": {        "operationId": "createCfdiDraftFromSalesReceipts",        "method": "POST",        "path": "/v1/cfdis/from-sales-receipts",        "environments": [          "production",          "sandbox"        ],        "headers": {          "Idempotency-Key": "workflow-receipts-to-cfdi"        },        "body": {          "salesReceiptRefs": [            "sales_receipt:receipt-example"          ],          "customer": {            "kind": "existing",            "customerId": "customer-example"          },          "cfdiUse": "S01"        }      },      "mcp": {        "tool": "create_cfdi_draft_from_sales_receipts",        "arguments": {          "idempotencyKey": "workflow-receipts-to-cfdi",          "input": {            "salesReceiptRefs": [              "sales_receipt:receipt-example"            ],            "customer": {              "kind": "existing",              "customerId": "customer-example"            },            "cfdiUse": "S01"          }        },        "environments": [          "production"        ]      }    },    {      "id": "read-converted-cfdi",      "rest": {        "operationId": "getCfdi",        "method": "GET",        "path": "/v1/cfdis/cfdi:invoice-example",        "environments": [          "production",          "sandbox"        ]      },      "mcp": {        "tool": "get_document",        "arguments": {          "documentRef": "cfdi:invoice-example"        },        "environments": [          "production"        ]      }    }  ]}
06Find and download a CFDISearch the CFDI collection with fiscal filters, retrieve a document, and download its PDF or XML.
  1. 1

    Search CFDIs

    Use kind and paymentTiming instead of a generic document type filter.

    REST · Production and sandboxGET /v1/cfdisMCP · Production onlysearch_documents

    Retry guidance: This read is safe to repeat and uses cursor pagination for later pages.

  2. 2

    Retrieve the CFDI

    Use the opaque CFDI reference returned by the collection response.

    REST · Production and sandboxGET /v1/cfdis/cfdi:invoice-exampleMCP · Production onlyget_document

    Retry guidance: Reads are safe to repeat and do not need an idempotency key.

  3. 3

    Download the PDF

    The REST route returns an attachment; the MCP tool returns a binary resource.

    REST · Production and sandboxGET /v1/documents/cfdi:invoice-example/files/pdfMCP · Production onlyget_document_file

    Retry guidance: File reads are safe to repeat and do not need an idempotency key.

  4. 4

    Download the XML

    Use the same documentRef to retrieve the fiscal XML when it is available.

    REST · Production and sandboxGET /v1/documents/cfdi:invoice-example/files/xmlMCP · Production onlyget_document_file

    Retry guidance: File reads are safe to repeat and do not need an idempotency key.

{  "steps": [    {      "id": "search-cfdis",      "rest": {        "operationId": "listCfdis",        "method": "GET",        "path": "/v1/cfdis",        "environments": [          "production",          "sandbox"        ],        "query": {          "kind": "income",          "status": "valid",          "dateFrom": "2026-01-01",          "dateTo": "2026-01-31",          "limit": 20        }      },      "mcp": {        "tool": "search_documents",        "arguments": {          "input": {            "category": "cfdi",            "kind": "income",            "status": "valid",            "dateFrom": "2026-01-01",            "dateTo": "2026-01-31",            "limit": 20          }        },        "environments": [          "production"        ]      }    },    {      "id": "get-cfdi",      "rest": {        "operationId": "getCfdi",        "method": "GET",        "path": "/v1/cfdis/cfdi:invoice-example",        "environments": [          "production",          "sandbox"        ]      },      "mcp": {        "tool": "get_document",        "arguments": {          "documentRef": "cfdi:invoice-example"        },        "environments": [          "production"        ]      }    },    {      "id": "download-pdf",      "rest": {        "operationId": "downloadDocumentFile",        "method": "GET",        "path": "/v1/documents/cfdi:invoice-example/files/pdf",        "environments": [          "production",          "sandbox"        ]      },      "mcp": {        "tool": "get_document_file",        "arguments": {          "documentRef": "cfdi:invoice-example",          "file": "pdf"        },        "environments": [          "production"        ]      }    },    {      "id": "download-xml",      "rest": {        "operationId": "downloadDocumentFile",        "method": "GET",        "path": "/v1/documents/cfdi:invoice-example/files/xml",        "environments": [          "production",          "sandbox"        ]      },      "mcp": {        "tool": "get_document_file",        "arguments": {          "documentRef": "cfdi:invoice-example",          "file": "xml"        },        "environments": [          "production"        ]      }    }  ]}
07Reconcile CFDI status with SATAsk SAT for the current status of a stamped CFDI after an asynchronous or uncertain provider result.
  1. 1

    Refresh SAT status

    Refresh requires verification data captured from the fiscal XML and reconciles local state.

    REST · Production onlyPOST /v1/cfdis/cfdi:invoice-example/status/refreshMCP · Production onlyrefresh_cfdi_status

    Retry guidance: Reuse the same key for the same document observation; this is a state-changing external read.

  2. 2

    Read the reconciled document

    Fetch the document again to consume the canonical local status and cancellation projection.

    REST · Production and sandboxGET /v1/cfdis/cfdi:invoice-exampleMCP · Production onlyget_document

    Retry guidance: Reads are safe to repeat and do not need an idempotency key.

{  "steps": [    {      "id": "refresh-cfdi-status",      "rest": {        "operationId": "refreshCfdiStatus",        "method": "POST",        "path": "/v1/cfdis/cfdi:invoice-example/status/refresh",        "environments": [          "production"        ],        "headers": {          "Idempotency-Key": "workflow-refresh-cfdi-status"        },        "body": {}      },      "mcp": {        "tool": "refresh_cfdi_status",        "arguments": {          "documentRef": "cfdi:invoice-example",          "idempotencyKey": "workflow-refresh-cfdi-status"        },        "environments": [          "production"        ]      }    },    {      "id": "read-reconciled-cfdi",      "rest": {        "operationId": "getCfdi",        "method": "GET",        "path": "/v1/cfdis/cfdi:invoice-example",        "environments": [          "production",          "sandbox"        ]      },      "mcp": {        "tool": "get_document",        "arguments": {          "documentRef": "cfdi:invoice-example"        },        "environments": [          "production"        ]      }    }  ]}
08Synchronize and report fiscal dataSchedule a document sync, then read CFDI aggregates and authoritative declaration totals separately.
  1. 1

    Verify FIEL readiness

    Read the organization and continue only when readiness.fiel is true. Upload the FIEL in Exac settings when it is false.

    REST · Production and sandboxGET /v1/organizationMCP · Production onlyget_organization

    Retry guidance: This read is safe to repeat.

  2. 2

    Schedule a document sync

    Choose one SAT source and an inclusive date range; the response only confirms scheduling.

    REST · Production onlyPOST /v1/tax/syncMCP · Production onlysync_sat_data

    Retry guidance: Reuse the same key for the same source and range; read results after the job completes.

  3. 3

    Read CFDI aggregates

    CFDI totals exclude receipt/POS sales and are distinct from declaration tax totals.

    REST · Production and sandboxGET /v1/reports/cfdiMCP · Production onlyget_cfdi_summary

    Retry guidance: This report is read-only and safe to repeat.

  4. 4

    Read declared tax totals

    Tax totals come only from parsed declarations; unavailable totals remain null rather than being estimated.

    REST · Production onlyGET /v1/reports/taxesMCP · Production onlyget_tax_summary

    Retry guidance: This report is read-only and safe to repeat.

{  "steps": [    {      "id": "verify-fiel-readiness",      "rest": {        "operationId": "getOrganization",        "method": "GET",        "path": "/v1/organization",        "environments": [          "production",          "sandbox"        ]      },      "mcp": {        "tool": "get_organization",        "arguments": {},        "environments": [          "production"        ]      }    },    {      "id": "sync-documents",      "rest": {        "operationId": "syncTaxData",        "method": "POST",        "path": "/v1/tax/sync",        "environments": [          "production"        ],        "headers": {          "Idempotency-Key": "workflow-sync-documents"        },        "body": {          "source": "documents",          "dateFrom": "2026-01-01",          "dateTo": "2026-01-31",          "kind": "all"        }      },      "mcp": {        "tool": "sync_sat_data",        "arguments": {          "idempotencyKey": "workflow-sync-documents",          "input": {            "source": "documents",            "dateFrom": "2026-01-01",            "dateTo": "2026-01-31",            "kind": "all"          }        },        "environments": [          "production"        ]      }    },    {      "id": "read-cfdi-summary",      "rest": {        "operationId": "getCfdiReport",        "method": "GET",        "path": "/v1/reports/cfdi",        "environments": [          "production",          "sandbox"        ],        "query": {          "monthFrom": "2026-01",          "monthTo": "2026-01"        }      },      "mcp": {        "tool": "get_cfdi_summary",        "arguments": {          "monthFrom": "2026-01",          "monthTo": "2026-01"        },        "environments": [          "production"        ]      }    },    {      "id": "read-tax-summary",      "rest": {        "operationId": "getTaxReport",        "method": "GET",        "path": "/v1/reports/taxes",        "environments": [          "production"        ],        "query": {          "fiscalYear": 2026        }      },      "mcp": {        "tool": "get_tax_summary",        "arguments": {          "fiscalYear": 2026        },        "environments": [          "production"        ]      }    }  ]}
09Record a receivable paymentRecord a customer payment and allocate it to open receipt balances with an auditable idempotent operation.
  1. 1

    Record and allocate the payment

    The allocation must reference receipts belonging to the customer and the organization.

    REST · Production and sandboxPOST /v1/accounts/receivables/customer-example/paymentsMCP · Production onlyrecord_payment

    Retry guidance: Retry only the exact payment with the same key to avoid a duplicate money movement.

  2. 2

    Verify the account balance

    Read the account projection after the mutation to display the new operational and fiscal balances.

    REST · Production and sandboxGET /v1/accounts/receivables/customer-exampleMCP · Production onlyget_accounts

    Retry guidance: Reads are safe to repeat and do not need an idempotency key.

{  "steps": [    {      "id": "record-payment",      "rest": {        "operationId": "createReceivablePayment",        "method": "POST",        "path": "/v1/accounts/receivables/customer-example/payments",        "environments": [          "production",          "sandbox"        ],        "headers": {          "Idempotency-Key": "workflow-receivable-payment"        },        "body": {          "allocations": [            {              "documentRef": "sales_receipt:receipt-example",              "amount": 500            }          ],          "paymentForm": "03",          "notes": "Bank transfer"        }      },      "mcp": {        "tool": "record_payment",        "arguments": {          "idempotencyKey": "workflow-receivable-payment",          "input": {            "direction": "received",            "customerId": "customer-example",            "allocations": [              {                "documentRef": "sales_receipt:receipt-example",                "amount": 500              }            ],            "paymentForm": "03",            "notes": "Bank transfer"          }        },        "environments": [          "production"        ]      }    },    {      "id": "read-receivable-account",      "rest": {        "operationId": "getReceivableAccount",        "method": "GET",        "path": "/v1/accounts/receivables/customer-example",        "environments": [          "production",          "sandbox"        ]      },      "mcp": {        "tool": "get_accounts",        "arguments": {          "input": {            "operation": "get",            "kind": "receivable",            "customerId": "customer-example"          }        },        "environments": [          "production"        ]      }    }  ]}

The contract is ready to build on

The OpenAPI 3.1 artifact is generated from the same operation ledger as the REST runtime and is checked against generated TypeScript and Python clients.