Fiscalapi

Mexico e-invoicing API for modern companies

Infrastructure and tools to integrate e-invoicing and CFDI 4.0 (Mexico's electronic invoice) without the heavy lifting. Compliance with the SAT (Mexico's tax authority) is guaranteed. Don't reinvent the wheel. Focus on your product.

SAT certification

Guaranteed validity for tax purposes

A PAC (a SAT-authorized provider that stamps CFDIs) verifies and stamps every invoice (stamping: the certification by a SAT-authorized provider that makes a CFDI valid) under current SAT rules. Your invoices are guaranteed valid for tax purposes.

ISO 27001 certification

Certified security and trust

Every invoice we process is verified and stamped by an organization certified to ISO/IEC 27001. Invoice processing runs under certified security and availability controls.

The complete tax platform

Everything your engineering team needs to integrate enterprise-grade e-invoicing.

JSON invoicing

Generate CFDIs with standard HTTP calls. The response returns the stamped invoice right away, valid for tax purposes.

Native CFDI complements

Complements (an XML extension the SAT defines for specific operations) for payments, payroll (payroll CFDI: the CFDI issued for each salary payment, type N), Carta Porte (the CFDI complement that documents the transport of goods in Mexico), Comercio Exterior (the CFDI foreign trade complement for exports), and local taxes. Native support, with no XML to build by hand.

Multi-RFC and multi-company

Issue CFDIs from any RFC (Mexico's taxpayer ID) to any RFC. Manage multiple companies from a single tenant (the space in Fiscalapi that holds your issuers, recipients, credits, and data).

Bulk CFDI download

Automatically download issued and received CFDIs straight from the SAT. Get XML files, metadata, and withholding CFDIs (the CFDI that reports taxes withheld from a payment) through download rules and download requests over the API.

CFDI and RFC validation

Check the structure, SAT seal (the seal inside the digital tax stamp that certifies the CFDI), issuer's digital seal (the issuer's signature over the CFDI, made with its CSD), and status of any CFDI. Validate RFCs against the SAT's lists of noncompliant taxpayers over the API.

Flexible architecture

Stateless or stateful. Send everything in the payload, or create your entities in Fiscalapi first. You decide how deep the integration goes.

Test environment

An unlimited test environment, no payment required. Production uses separate credentials.

CFDI storage

Your invoices are stored as XML and PDF. Retrieve them through the API or download them from the dashboard.

PDF generation

Invoice PDFs are generated automatically. Customize the branding, logo, and colors for each RFC.

Automated delivery

Email invoices as XML and PDF, with customizable templates for each issuer.

SAT catalogs

API access to up-to-date SAT catalogs for CFDI 4.0, payroll, and Carta Porte. No catalog tables to maintain in your system.

White label by design

A brand-agnostic API that works with any system and programming language. Build it into web, desktop, or mobile apps under your own brand.

Issue invoices in minutes, not months

1

Sign up

Get access to the test environment. No payment required.

2

Test API key

Generate a test API key from the dashboard.

3

Build your integration

Integrate with an official SDK or call the REST API directly. Read the technical docs and test stamping.

4

Go to production

Switch environments from the dashboard with one click.

5

Production API key

Generate a production API key from the dashboard.

6

Replace your API keys

Replace the test API key with the production API key in your integration.

7

Activate production

Activate your subscription from the dashboard and start issuing CFDIs in production.


var fiscalApi = FiscalApiClient.Create(Settings);

var invoice = new Invoice
{
    VersionCode = "4.0",
    Series = "SDK-F",
    Date = DateTime.Now,
    PaymentFormCode = "01",
    CurrencyCode = "MXN",
    TypeCode = "I",
    ExpeditionZipCode = "42501",
    PaymentMethodCode = "PUE",

    // Issuer
    Issuer = new InvoiceIssuer { Id = "<id>" },

    // Recipient
    Recipient = new InvoiceRecipient { Id = "<id>"},

    // Products and services
    Items = new List<InvoiceItem>
    {
        new InvoiceItem
        {
            Id = "<id>",
            Quantity = 1,
            Discount = 10.85m
        }
    },
};
// Stamp the invoice
var apiResponse = await fiscalApi.Invoices.CreateAsync(invoice);

How issuing a CFDI works

Go from zero to your first stamped invoice in four steps.

  1. 1

    Sign up

    Set up your issuing RFC with its CSD (the digital seal certificate used to sign CFDIs) and get your API key.

  2. 2

    Build the JSON

    Define the issuer, recipient, and line items in a plain JSON payload, along with the form of payment (how the customer paid: cash, bank transfer, card; the FormaPago key) and the payment method (whether the CFDI is paid in full when issued, PUE, or later or in installments, PPD; not how the customer pays).

  3. 3

    Stamp through the API

    A POST request validates, seals, and stamps the CFDI 4.0 with the SAT in a single call.

  4. 4

    Get the XML and PDF

    You get the stamped XML with its UUID (folio fiscal, the unique ID the PAC assigns when it stamps a CFDI) and a PDF version ready to send.

Designed for engineering teams that build software products

RESTful API

A standardized API built on REST principles. Predictable, resource-oriented endpoints.

Well documented

Complete technical documentation, updated continuously. API reference, integration guides, and code samples.

Developer resources

Official SDKs and libraries in multiple languages. Reference code is available on GitHub

Standard responses

Standardized responses encoded in JSON. HTTP status codes that follow REST conventions.

Fiscalapi on a mobile phone

Why Fiscalapi?

Tax regulatory complexity, eliminated. Automated compliance for modern companies.

Native CFDI complements.

With other solutions, you build and validate the complement XML yourself. Fiscalapi generates it automatically from JSON.

Time to market: days, not months.

Your team doesn't maintain tax code. Complete the integration in days with SDKs, an API reference, and detailed technical docs.

Automatic compliance.

SAT updates are applied automatically. Your integration stays current without any work from your team.

No limits on scale.

No restrictions on tenants, issuers, recipients, people who sign in, or invoices. Predictable pricing that grows with your operation.

Fiscalapi preview

One invoicing API for every kind of platform

Engineering teams at SaaS companies, ERP vendors, ecommerce businesses, and software development firms use Fiscalapi to comply with the SAT without building their own tax infrastructure.

Read the Mexico e-invoicing guide →

SaaS platforms

Add CFDI 4.0 e-invoicing to your product like any other feature. Your customers issue and stamp invoices from your platform through the API, with multi-RFC support and per-tenant isolation.

See the CFDI API →

Enterprise ERPs

Connect your ERP to the SAT. Stamp invoices, payment complements (the complement that records each payment received against a PPD invoice; the type P CFDI that carries it is also called REP), payroll, and Carta Porte. Add bulk download (the SAT service that delivers the CFDIs a taxpayer issued and received) for automatic accounting reconciliation of received CFDIs.

See bulk CFDI download from the SAT →

Ecommerce and marketplaces

Issue an income (I) CFDI for every sale. Group sales to the general public (customers who did not ask for their own CFDI) into a global invoice (factura global, one CFDI that groups a period's sales to the general public). Issue credit notes (Egreso CFDIs, type E) for returns. All of it is automated with JSON REST calls.

Automate invoicing →

Software development firms

Offer e-invoicing to all your customers without building your own CFDI engine. One integration, unlimited tenants, and separate API keys for each project.

Explore the documentation →

Companies that scale with Fiscalapi

Tax infrastructure adopted by engineering teams, SaaS platforms, ERPs, and software development firms.

Partner 1
Partner 2
Partner 3
Partner 4
Partner 5
Partner 6
Partner 7
Partner 8

Mission-critical infrastructure

Real metrics from our platform. Compliance managed automatically.

99.9%

Platform availability. Infrastructure monitored 24/7 with active redundancy.

<500ms

Average stamping latency. Immediate responses for real-time invoicing operations.

10M+

Invoices processed every month. Enterprise capacity proven at scale.

100%

Automatic compliance. SAT updates applied without any work on your side.

Predictable cost, guaranteed compliance

Raise the bar on SAT tax compliance with Fiscalapi solutions.

CFDI invoicing

Stamp CFDI 4.0 invoices with our API. Supports income, credit note, payment, and payroll CFDIs, Carta Porte, and more.

From $199 MXN /month

Base subscription. Stamps (one credit, used each time you stamp a CFDI) are sold separately.

See details

Bulk CFDI download

Automatically download issued and received CFDIs straight from the SAT. CFDIs, metadata, and withholding CFDIs.

From $99 MXN /month per RFC and download type

Add-on. Requires the CFDI invoicing base subscription.

See details

CFDI validation

Before you pay or deduct any CFDI, verify its XML structure, seals, and status, and whether the RFC is on the Lista 69-B or Lista 69-B Bis.

From $0.50 MXN per validation

Add-on. Requires the CFDI invoicing base subscription.

See details

Auto CFDI invoicing

Your customers invoice their tickets in your auto-invoice portal, and tickets nobody invoices go into the global invoice.

From $199 MXN /month + ticket credits

Add-on. Requires the CFDI invoicing base subscription.

See details

Frequently asked questions about the e-invoicing API

What is an e-invoicing API?

It's a web service that lets any system (SaaS, ERP, ecommerce) generate, stamp, cancel, and look up CFDI 4.0 invoices with the SAT through HTTP calls with JSON, so you don't have to build your own invoicing engine.

How do I stamp CFDI 4.0 invoices from my system?

Send a POST with the invoice data in JSON. The API validates, seals, and stamps the CFDI in a single call. The response includes the stamped XML with its UUID and its PDF version.

Are invoices issued with Fiscalapi valid for tax purposes?

Yes. Every invoice is verified and stamped through a PAC under current SAT rules, with processing certified under ISO/IEC 27001.

How much does the e-invoicing API cost?

The base subscription costs $199 MXN per month and includes multi-RFC issuing. You buy stamps in packages based on your volume, and they don't expire. Bulk CFDI download costs $99 MXN per month per RFC and download type (issued or received).

Is there a free test environment?

Yes. The test environment has no cost and no stamp limit, uses the same endpoints as production, and lets you validate your whole integration before launch.

Which SDKs and languages are available?

There are official SDKs for C#, Node.js, Python, Java, and PHP, with reference code and samples on GitHub, plus a Postman collection to test the API directly.

Can I issue CFDIs from several RFCs in one tenant?

Yes. One tenant manages multiple issuing RFCs, each with its own CSD, people who sign in, and API keys. It's the setup that multi-company SaaS platforms and software development firms use.

Can I download the CFDIs my customers issue in other systems?

Yes. The Bulk CFDI download add-on retrieves from the SAT the issued and received CFDIs of any authorized RFC, with metadata and withholding CFDIs, whatever system created them.

Take the next step

Evaluate Fiscalapi with your team