Brazilian Invoice & Receipt PDF API
Generate professional invoice and receipt PDFs with native Brazilian fiscal fields — validated CPF/CNPJ, BRL currency, PT-BR labels, amount in words, and an optional PIX QR code. No other invoicing API on RapidAPI covers Brazil this way.
Free tier: 20 documents/month, no credit card. Docs: POST /invoice · POST /receipt · Or use the free browser-based generator (PT-BR, no signup, nothing sent to any server).
Built for Brazilian fiscal documents
Every field a Brazilian invoice or receipt actually needs — checked, formatted, and laid out correctly by default.
Real CPF/CNPJ validation
Both document types are validated by their actual check-digit algorithm — not just digit count — then auto-masked (123.456.789-09 / 12.345.678/0001-95).
Correct BRL formatting
R$ 1.234,56 — thousands-dot, comma-decimal — computed without floating-point rounding errors.
DD/MM/YYYY dates
Accepts ISO or BR-formatted input, always renders the format every Brazilian document uses.
Amount in words (PT-BR)
"seis mil, cento e quarenta e nove reais e noventa centavos" — the norm on formal Brazilian receipts. Automatic on receipts, opt-in on invoices.
Optional PIX QR code
Pass a "copia e cola" BR Code your own bank/PSP already generated — the API embeds it as a scannable QR code on the PDF.
No headless browser
Built on a pure-JS PDF engine (pdf-lib) — under 500ms per document, no Chromium cold start, serverless-friendly.
One HTTP call, PDF back
Send issuer, recipient, and line items — get a ready-to-send PDF. Works through the RapidAPI gateway with your API key.
curl -X POST "https://brazilian-invoice-receipt-pdf-api-cpf-cnpj.p.rapidapi.com/invoice" \
-H "content-type: application/json" \
-H "X-RapidAPI-Key: YOUR_RAPIDAPI_KEY" \
-H "X-RapidAPI-Host: brazilian-invoice-receipt-pdf-api-cpf-cnpj.p.rapidapi.com" \
-d '{
"tipo": "fatura",
"numero": "0001/2026",
"emitente": {
"nome": "Atlas Soluções Digitais LTDA",
"documento": "11.222.333/0001-81",
"endereco": "Av. Paulista, 1000 - São Paulo/SP"
},
"destinatario": {
"nome": "Comércio Silva & Filhos ME",
"documento": "22.333.444/0001-81"
},
"itens": [
{ "descricao": "Consultoria", "quantidade": 10, "valor_unitario": 250 }
],
"forma_pagamento": "PIX"
}' \
-o invoice.pdf
Response: 200 application/pdf — the raw PDF bytes, ready to save or stream to your user. Validation errors come back as 400 application/json with a stable error code and a human-readable message — no stack traces. See the full request schema, all fields, and every status code in the RapidAPI listing.
Pricing
Billed and metered by RapidAPI. Start free, upgrade when you need more volume.
Frequently asked questions
Straight answers, matching exactly what the API does today.
Is this a legally valid Nota Fiscal Eletrônica (NF-e)?
No. This API generates a formatted invoice (fatura) or receipt (recibo) PDF — not a legally valid Brazilian Nota Fiscal Eletrônica. Issuing a real NF-e requires an ICP-Brasil digital certificate tied to the issuer's CNPJ and direct integration with SEFAZ, the state tax authority.
How does it validate CPF and CNPJ?
It runs the real Brazilian check-digit algorithm for CPF (11 digits) and CNPJ (14 digits) — not just a digit-count check. A document with the right number of digits but an invalid check digit is rejected with a 400 error before any PDF is generated.
Does it support PIX?
Yes, optionally. You provide a "pix copia e cola" (BR Code) string that your own bank or payment provider already generated, and the API embeds it as a scannable QR code on the PDF. The API does not generate PIX payment codes itself.
What runtime does it use, and how fast is it?
PDFs are rendered with pdf-lib, a pure-JavaScript PDF library — no headless browser (no Chromium/Puppeteer). Typical response time is well under 500ms per document, including when a PIX QR code is embedded.
How much does it cost?
Free tier: 20 documents/month, no credit card required. Paid tiers: Pro $12.99/month (500 documents), Business $24.99/month (3,000 documents), Enterprise $59.99/month (15,000 documents).
How do I call the API?
Send a POST request to /invoice (or /receipt) through the RapidAPI gateway with your X-RapidAPI-Key and X-RapidAPI-Host headers and a JSON body describing issuer, recipient, and line items. The response is the PDF file (application/pdf).
⚠️ This is not a Nota Fiscal Eletrônica (NF-e)
This API generates a formatted fatura (invoice) or recibo (receipt) document — a well-laid-out PDF with your business and customer data, line items, totals, and Brazilian formatting. It is not a legally valid Brazilian Nota Fiscal Eletrônica.
Issuing a real NF-e requires, at minimum:
- An A1/A3 digital certificate (ICP-Brasil) tied to the issuer's CNPJ
- Direct integration with SEFAZ (the state tax authority) for authorization and signing
- Municipal/state tax registration and compliance specific to the issuer's activity
Use this API for internal billing records, client-facing invoices/receipts alongside your real fiscal documents, freelancer proof-of-payment, or any case where a professional PDF is enough — not as a replacement for your NF-e obligations.
🇧🇷 Feito também para devs brasileiros
Esta API gera fatura ou recibo em PDF com CPF/CNPJ validado por dígito verificador (não só contagem de dígitos), moeda em real (R$ 1.234,56), datas no formato brasileiro e valor por extenso — pronta pra integrar em qualquer sistema de cobrança, marketplace ou plataforma que atenda clientes no Brasil.
Importante: gera um documento formatado (fatura/recibo), não uma Nota Fiscal Eletrônica (NF-e) com validade jurídica — isso exige certificado digital e integração com a SEFAZ.