Documentation

Brazilian invoicing, for developers

Everything we had to learn to build this API, written down properly: the check-digit maths, the PIX payload format, the currency and date conventions, the difference between the documents Brazilian law recognizes — and working integration code for seven stacks.

17 guides · updated 2026-08-07 · free to read, no signup

Every page here is written to be useful on its own, whether or not you ever call the API. The algorithms are the real ones — the same code paths that run in production — and the worked examples were verified against the implementation, not written from memory.

Integration guides

The same API, once per stack. Each one covers the request shape, error handling, streaming the PDF back from a web framework, retry strategy, and a section on the traps specific to that language — Python's .text versus .content, PHP's stray closing tag, .NET's socket exhaustion, Go's omitempty. Each also ships a dependency-free CPF/CNPJ validator in that language.

Integration

Generate a Brazilian invoice PDF in Node.js

Working Node.js code to generate a Brazilian fatura or recibo as a PDF: native fetch, saving to disk, streaming from Express, retry with backoff, and a dep…

Integration

Generate a Brazilian invoice PDF in Python

Python code that generates a Brazilian fatura or recibo PDF: requests with a retry adapter, async httpx, returning the file from Django and FastAPI, and a …

Integration

Generate a Brazilian invoice PDF in PHP

PHP code that generates a Brazilian fatura or recibo PDF: raw cURL and Guzzle, streaming the file to the browser without corrupting it, plus a dependency-f…

Integration

Generate a Brazilian invoice PDF in Laravel

Laravel integration for Brazilian invoice and receipt PDFs: a typed service class, the Http facade with retries, a queued job, streaming downloads, and a c…

Integration

Generate a Brazilian invoice PDF in Go

Idiomatic Go for generating Brazilian fatura and recibo PDFs: typed structs with omitempty, a reusable http.Client, context deadlines, streaming to an http…

Integration

Generate a Brazilian invoice PDF in C# (.NET)

C# integration for Brazilian invoice and receipt PDFs: IHttpClientFactory, System.Text.Json with Portuguese field names, Polly retries, returning FileConte…

Integration

Generate a Brazilian invoice PDF in Ruby on Rails

Ruby and Rails integration for Brazilian invoice and receipt PDFs: a plain Net::HTTP client with no gem, send_data in the controller, an ActiveJob with ret…

Reference & explainers

The domain knowledge. If you are building Brazilian billing software, these are the things that are not obvious from outside and each one is a small bug waiting to happen.

Use cases

Problem-first: what to build for a given situation, including the two cases where the honest answer is "you do not need this API for that".

Free tools, no signup

Client-side utilities that run entirely in your browser — nothing is sent to any server, which also makes them safe to paste real data into while debugging.

Generate Brazilian invoices and receipts from your own code

POST a JSON payload, get a ready-to-send PDF: checksum-validated CPF/CNPJ, R$ 1.234,56 currency, DD/MM/YYYY dates, amount in words, optional PIX QR. Free tier: 20 documents/month, no credit card.

Get an API key on RapidAPI → See what the PDF looks like