Recaudo Docs

Payments & customers

E-invoicing (CFDI)

Stamp, read, send and cancel e-invoices (CFDI 4.0), and register their payments with a payment complemento.

Mexico only for now. The account needs its fiscal data and CSD uploaded in Settings > Fiscal; call /v1/einvoice/config to check before stamping. The mobile app uses these same endpoints.

Setup and catalogs

GET /v1/einvoice/config RFC, tax regime, series, next folio and certificate validity. The CSD is never returned.
PUT /v1/einvoice/config Save the issuer's fiscal data. Mexico: RFC, tax regime, postal code and series. Other countries: the fields in country_profile.tenant_fields and credential_fields.
POST /v1/einvoice/config/csd Upload the Mexican CSD (.cer, .key and password) as multipart or base64. Checks that the password opens the key, that it is a CSD and not an e.firma, that it has not expired and that the RFC matches.
GET /v1/einvoice/numbering-ranges Colombia: authorized numbering resolutions to choose numbering_range_id. With refresh=true they are fetched again from Factus.
GET /v1/einvoice/catalogs SAT catalogs: CFDI use, payment forms and methods, tax regimes, units, tax object, rates and cancellation reasons.
GET /v1/einvoice/product-keys Search product and service keys with q. The ones you already used come first.
GET /v1/customers/{id}/fiscal-data The customer's fiscal data and whether it is complete.
PUT /v1/customers/{id}/fiscal-data Save or replace the customer's fiscal data. Validates RFC, regime and postal code.

Invoices

GET /v1/einvoice List CFDIs. Filter by status, customer_id, tipo (I or P), search, date_from, date_to and limit.
POST /v1/einvoice Stamp an income CFDI. Takes fiscal_data if the customer doesn't have it yet.
POST /v1/orders/{id}/einvoice Stamp the CFDI of a paid order, from the store or the point of sale.
GET /v1/einvoice/{id} A CFDI with line items and XML. PPD documents also include saldo_pendiente and payments.
GET /v1/einvoice/{id}/xml Download the stamped XML (application/xml).
GET /v1/einvoice/{id}/pdf Download the PDF. It is generated the first time it is requested.
POST /v1/einvoice/{id}/send-email Send the CFDI to the customer's email with PDF and XML. Takes cc, up to 5 addresses.
POST /v1/einvoice/{id}/retry Stamp again a CFDI in error status with corrected receiver data.
POST /v1/einvoice/{id}/cancel Cancel before the SAT. Send motivo (01 to 04) and, with motivo 01, folio_sustitucion.

Payments and complementos

POST /v1/einvoice/{id}/payments Register a payment on a PPD CFDI and stamp its complemento.
POST /v1/einvoice/payments/{id}/complemento Stamp the complemento of a payment already registered.

Global invoice

POST /v1/einvoice/global Stamps the global invoice for sales to the general public: periodicidad (01-05), meses, anio, forma_pago and one concepto per sale or ticket (no_identificacion, valor_unitario). Uses RFC XAXX010101000, regime 616, use S01 and the issuer ZIP.

Prepaid stamps

GET /v1/einvoice/balance Stamp balance. metered=false when the account does not use packages (unlimited stamping). stamps_remaining are package stamps (they do not expire); monthly holds the plan's stamps for the current period (included, used, remaining, period_end; they do not roll over) and stamps_available adds both. Monthly stamps are used first. plan_active=false when the reseller plan is not paid up: stamping is blocked (402 plan_required). stamp_cost tells how many stamps an invoice (invoice) and a global invoice (global) use. If there are not enough, it returns 402 no_stamps with required and remaining.
POST /v1/einvoice/packages/{id}/checkout Payment link for an extra package (accepts return_url). Stamps are credited once it is paid. Requires the plan to be paid up (otherwise 402 plan_required).

Set up the issuer from your app

With these endpoints the business enters its fiscal data inside your app, without opening another page. They require the secret key (sk_); with the publishable key they return 403. Save the RFC first, then upload the CSD.

curl -X PUT https://recaudo.app/api/v1/einvoice/config \
  -H "Authorization: Bearer sk_live_tu_secret_key" \
  -H "Content-Type: application/json" \
  -d '{"tax_id": "EKU9003173C9", "legal_name": "EMPRESA DE EJEMPLO", "tax_regime": "601", "fiscal_address_zip": "06600", "series": "A"}'

curl https://recaudo.app/api/v1/einvoice/config/csd \
  -H "Authorization: Bearer sk_live_tu_secret_key" \
  -F cer_file=@certificado.cer -F key_file=@llave.key -F key_password=********

If the CSD is not usable, the response is 422 with error.code and error.param (the field to fix):

invalid_certificate · invalid_password · key_mismatch · fiel_not_csd · certificate_expired · rfc_mismatch · tax_id_required

In other countries, PUT /v1/einvoice/config also takes the provider credentials (for example Factus, OpenFactura or Nubefact). Credentials already saved can be omitted. On save we test the connection and the result appears in provider_connection of GET /v1/einvoice/config.

Stamp an invoice

If you send fiscal_data, it is saved on the customer. Amounts are decimals, and valor_unitario excludes IVA. Without clave_prod_serv it uses 01010101 and without clave_unidad, E48.

curl https://recaudo.app/api/v1/einvoice \
  -H "Authorization: Bearer sk_live_tu_secret_key" \
  -H "Content-Type: application/json" \
  -d '{
    "customer_id": "01234567-89ab-cdef-0123-456789abcdef",
    "metodo_pago": "PUE",
    "forma_pago": "03",
    "uso_cfdi": "G03",
    "fiscal_data": {
      "rfc": "COSC8001137NA",
      "razon_social": "CLIENTE DE EJEMPLO",
      "regimen_fiscal": "612",
      "codigo_postal": "06600"
    },
    "conceptos": [
      {
        "descripcion": "Instalación eléctrica",
        "cantidad": 1,
        "valor_unitario": 1500.00,
        "clave_prod_serv": "72151500",
        "clave_unidad": "E48",
        "tasa_iva": 0.16
      }
    ]
  }'

With metodo_pago PUE, forma_pago is the real payment form. With PPD it must be 99 (Por definir). A Recaudo invoice (invoice_id) allows one active income CFDI.

Register a payment and stamp the complemento

When a PPD CFDI is paid, register the payment and Recaudo stamps the complemento (CFDI type P). The payment cannot exceed the balance or use forma_pago 99. To hold off stamping, send generate_complemento as false.

curl https://recaudo.app/api/v1/einvoice/{id}/payments \
  -H "Authorization: Bearer sk_live_tu_secret_key" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 870.00,
    "forma_pago": "03",
    "payment_date": "2026-11-02",
    "payment_reference": "SPEI 123456"
  }'
{
  "object": "einvoice_payment",
  "data": {
    "id": "fedcba98-7654-3210-fedc-ba9876543210",
    "status": "stamped",
    "amount": 870,
    "forma_pago": "03",
    "payment_date": "2026-11-02",
    "complemento_id": "11111111-2222-3333-4444-555555555555"
  },
  "saldo_pendiente": 870,
  "complemento": { "id": "11111111-2222-3333-4444-555555555555", "tipo_comprobante": "P", "status": "stamped" },
  "complemento_error": null
}

If the payment was saved but stamping failed, the response is 201 with complemento_error. Retry with POST /v1/einvoice/payments/{id}/complemento; do not register the payment again. Cancelling a complemento leaves its payment ready to stamp again.

For now the complemento only works with MXN invoices and line items at 16% IVA. Other cases return complemento_unsupported.

Invoice an order

Works for point of sale and store sales. The order must be paid. fiscal_data is kept on the order, not the customer, because counter sales usually share one customer; if you omit it, the customer's data is used. forma_pago is optional: cash becomes 01 automatically and cards come from the charge, or 04 when debit or credit is unknown. Stamping happens in the same call.

curl https://recaudo.app/api/v1/orders/{id}/einvoice \
  -H "Authorization: Bearer sk_live_tu_secret_key" \
  -H "Content-Type: application/json" \
  -d '{
    "forma_pago": "28",
    "fiscal_data": {
      "rfc": "COSC8001137NA",
      "razon_social": "CLIENTE DE EJEMPLO",
      "regimen_fiscal": "612",
      "codigo_postal": "06600",
      "uso_cfdi": "G03"
    }
  }'

If the customer asks for an invoice at store checkout, the order is invoiced automatically: the CFDI arrives in order.invoiced and in the einvoice field of the order.

E-invoicing errors

fiscal_config_missing The account has no active fiscal data or CSD.
unsupported_country The account's country has no e-invoicing.
customer_fiscal_data_incomplete The receiver's RFC, legal name, regime or postal code is missing.
einvoice_already_exists The invoice or order already has an active CFDI (409).
stamp_failed The PAC or the SAT rejected the stamp. The message has the reason.
no_stamps The account uses prepaid stamps and has none left (HTTP 402). Buy a package.
layaway_not_stampable Layaways are not stamped.
order_not_paid The order is not paid yet.
amount_exceeds_balance The payment is larger than the balance.
not_stamped_income The document is not a stamped income CFDI.
not_ppd The CFDI is not PPD.
complemento_unsupported The invoice is not in MXN at 16% IVA.
payment_not_registered The payment was already stamped or cancelled.
customer_without_email The customer has no email.
mail_not_configured The account has no email provider.
Was this page helpful? Thanks for letting us know.
Esc