Skip to content
Clauhub

Developers

Issue CFDI and query SAT from your code

The same API the Clauhub app uses: issue and cancel invoices, download your documents from SAT and check your suppliers against the 69-B list. With an API key, or from your AI agents over MCP.

Something custom? Talk to sales →

POST /api/rpc/books/issuance/issue · Issue a CFDI
curl https://clauhub.ai/api/rpc/books/issuance/issue \
  -H "x-api-key: $CLAUHUB_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "json": {
    "organizationId": "ORGANIZATION_ID",
    "fiscalEntityId": "FISCAL_ENTITY_ID",
    "kind": "mx.cfdi",
    "attemptId": "0b6f9c1e-6a2d-4f7e-9a51-2f0f6c8f3b10",
    "capture": {
      "invoiceType": "sale",
      "voucherType": "I",
      "paymentForm": "03",
      "paymentMethod": "PUE",
      "currency": "MXN",
      "currencyDecimals": 2,
      "exportation": "01",
      "receiver": {
        "rfc": "ICV060329BY0",
        "name": "INMOBILIARIA CVA",
        "receiverTaxPostalCode": "33826",
        "receiverTaxRegime": "601",
        "cfdiUsage": "G03"
      },
      "concepts": [
        {
          "productServiceCode": "81112100",
          "quantity": "1",
          "unitCode": "E48",
          "description": "Suscripción mensual",
          "unitPrice": "239.00",
          "taxObject": "02",
          "taxes": [
            {
              "type": "transfer",
              "tax": "002",
              "factorType": "Tasa",
              "taxRate": "0.160000"
            }
          ]
        }
      ]
    }
  }
}'

An income invoice with 16% VAT. It answers at once with the document queued; stamping runs as a job and the state moves to issued or rejected.

Sending the same attemptId again answers the same document: it never issues twice.

Quickstart

Your first call in three steps.

Start with a preview: it stores nothing and uses no stamps.

  1. 01

    Create your API key

    With your Clauhub account, ask for a key. It is shown once (ch_…); keep it as CLAUHUB_API_KEY.

    POST /api/rpc/identity/apiKeys/create
    → "key": "ch_…"

    How to create a key →Create an account →

  2. 02

    Make your first call

    Preview a CFDI: it answers the document, its totals and notices. It stores nothing, takes no number and uses no stamps.

    POST /api/rpc/books/issuance/preview
    → "totals": { "total": "277.24", … }

    A call's shape →

  3. 03

    Issue and check the state

    Issue with an attemptId and read the document: it moves from queued to issued, with its UUID, or to rejected with the reason.

    POST /api/rpc/books/issuance/get
    → "state": "issued"

    Read the docs →

What you can do

Invoicing and SAT, by API.

CFDI invoicing

Issue CFDI 4.0 with its complements

Preview without storing anything, issue with an attemptId that prevents duplicates, follow the stamping state, cancel, download the XML and PDF or email it. Each stamp uses credits from your balance.

  • POST /api/rpc/books/issuance/preview
  • POST /api/rpc/books/issuance/issue
  • POST /api/rpc/books/issuance/cancel
  • POST /api/rpc/books/issuance/download

SAT download

Bring in your issued and received documents

Request a month (or some days) of issued or received CFDIs, or their metadata, with your stored e.firma. It is recorded as a job at once; you can also request one document by its UUID.

  • POST /api/rpc/books/sync/request
  • POST /api/rpc/books/sync/requestDocument
  • POST /api/rpc/books/sync/get

69-B and 69 lists

Check RFCs against SAT's lists

Ask whether an RFC is on list 69-B or 69 as of the last daily sync, see which suppliers on your invoices are listed, and verify your CFDIs with SAT, one, up to 500 or all at once.

  • POST /api/rpc/books/mx/lists/lookup
  • POST /api/rpc/books/mx/lists/matches
  • POST /api/rpc/books/mx/verification/verify
POST /api/rpc/books/mx/lists/lookup · Is this RFC on the 69-B list?
curl https://clauhub.ai/api/rpc/books/mx/lists/lookup \
  -H "x-api-key: $CLAUHUB_API_KEY" \
  -H "content-type: application/json" \
  -d '{
  "json": {
    "organizationId": "ORGANIZATION_ID",
    "taxId": "ICV060329BY0"
  }
}'

Answers whether it is listed, in which situation, and when the list was last synced.

And everything else the app does: every procedure people use is in the API and is an MCP tool.

MCP

Connect your AI agents.

An MCP server with the same operations as the API, so your assistant issues, queries and checks for you, with your permissions.

Server URLhttps://clauhub.ai/api/mcp
Connect over MCP

With the URL alone

Your MCP client finds where to sign in, registers itself and takes you to approve access (OAuth with PKCE). The consent screen names the app asking.

Or with your API key

Send it as Authorization: Bearer ch_… and it works just like x-api-key.

Every procedure, a tool

Tools with a name, description and input schema, like books_issuance_issue. Every call is made as you: each service decides with your permissions.

Security

Your key acts as you, and nothing more.

  • The key (ch_…) is shown once and stored only as a hash.
  • It acts as its user: the same roles and permissions, checked on the server on every call.
  • Disable it, enable it again or delete it at any time; a disabled or deleted key answers 401.
  • Creating a key is recorded in the audit log.
How we protect your information →

Pricing

You pay for stamps. Calls come with your plan.

$299.52

MXN + VAT per 100 stamps

($347.44 with VAT)

One stamp per CFDI issued, from your credit balance. If stamping is rejected, the credit is released.

API calls a month

Free
100,000
Team
100,000
Business
Unlimited
Enterprise
Quoted

On Free and Team, calls past the limit are paid in credits: 1 credit per 100,000.

See rates and limits →

Comparing invoicing APIs?

Clauhub and Facturapi, row by row: CFDI types, sandbox, webhooks, SDKs, SAT download and price per stamp.

See the comparison →

Start building.

Create your key and make your first call, or tell us what you want to connect.