> ## Documentation Index
> Fetch the complete documentation index at: https://invoiceapi.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Invoice API

> A Stripe-quality REST API for Mexican electronic invoicing (CFDI 4.0).

Build, stamp, cancel, validate, and bulk-download **CFDI 4.0** invoices with a developer-first,
agent-first API. Friendly JSON in — a SAT-stamped `UUID` out.

<CardGroup cols={2}>
  <Card title="Quickstart" icon="bolt" href="/quickstart">
    Stamp your first invoice in three requests — zero credentials, simulated PAC.
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference">
    Every endpoint, request, and response — generated from the OpenAPI 3.1 spec.
  </Card>

  <Card title="Connect (multi-tenant)" icon="diagram-project" href="/guides/connect">
    One platform key, many tenants — Stripe Connect–style. Built for accounting apps.
  </Card>

  <Card title="Going live" icon="rocket" href="/guides/going-live">
    Live API keys, a real CSD, the carta manifiesto, and the production checklist.
  </Card>
</CardGroup>

## What it does

<CardGroup cols={3}>
  <Card title="Fiscal profiles" icon="id-card">
    Register an emitter RFC + CSD (and FIEL). Keys are AES-256-GCM encrypted and never returned.
  </Card>

  <Card title="Invoices" icon="file-invoice">
    JSON → CFDI 4.0 XML → local CSD sello → PAC stamp. Drafts, PDF, credit notes, complemento de pago.
  </Card>

  <Card title="Cancellation" icon="ban">
    Motivos 01–04 with the SAT acuse and receptor-acceptance polling.
  </Card>

  <Card title="Validation" icon="circle-check">
    Validate any CFDI XML — structure, arithmetic, sello, and SAT status.
  </Card>

  <Card title="Massive download" icon="cloud-arrow-down">
    SAT descarga masiva jobs by date range, issued/received, CFDI or metadata.
  </Card>

  <Card title="Webhooks" icon="webhook">
    HMAC-signed events with retries — including Connect webhooks across all your tenants.
  </Card>
</CardGroup>

## SDKs

Two first-party SDKs wrap the API — both fully typed, dependency-free, and covering every
endpoint (invoices, fiscal profiles, downloads, webhooks, events, usage, versions):

<CardGroup cols={2}>
  <Card title="Node.js" icon="node-js">
    `@invoice-api/node` — ESM, fully typed, with a webhook-signature verifier.
  </Card>

  <Card title="Python" icon="python">
    `invoice_api` — stdlib-only, Python 3.9+, with the same webhook verifier.
  </Card>
</CardGroup>

<Note>
  Neither package is on a public registry yet — `npm install @invoice-api/node` and
  `pip install invoice-api` 404 today. Install from the repository (`npm pack` the `sdk/` folder,
  or `pip install ./sdk-python`); the exact commands live in the repo README's **SDKs** section.
</Note>

## Built for agents

RFC 9457 `problem+json` errors carry a stable `code` and human- **and** LLM-readable
`remediation`. The API ships `llms.txt`, an OpenAPI 3.1 spec, and a simulated PAC so anything —
human or agent — can integrate with zero credentials. Dated versioning (`Invoice-Version`) keeps
old integrations stable — see the [changelog](/concepts/versioning).

<Note>
  Test mode (`sk_test_`) targets the sandbox or the built-in simulated PAC; live mode
  (`sk_live_`) targets production. Data is fully isolated per mode.
</Note>
