TF Fiscal
Documentation

Getting started

Overview of the TF Fiscal Open API, its capabilities, the three integration steps and where to read next.

TF Fiscal is a fiscal document platform for Brazil. Through one signed HTTP API your application issues NF-e, CT-e and DC-e on behalf of the companies you register, verifies third-party NF-e documents against SEFAZ, looks up CNPJ and CPF registry data, and receives every asynchronous result through webhooks.

Capabilities

CapabilityWhat it doesDocumentation
NF-eIssue, query and cancel NF-e (model 55) for registered companies; register and list correction letters (CC-e)NF-e
CT-eIssue, query and cancel CT-e (model 57, road modal) and register post-authorization eventsCT-e
DC-eIssue, query and cancel DC-e (model 99) for marketplaces and companies issuing for themselvesDC-e
NF-e verificationTwo-tier verification of third-party NF-e XML files, plus lookup by access key (chave)NF-e verification
Identity lookupOfficial registry data for a CNPJ, or for a CPF together with its date of birthIdentity lookup
WebhooksSigned callbacks carrying issuance results, post-authorization events and verification verdictsWebhooks

Companies, certificates and the webhook configuration are shared by every issuing document type: a company registered once can issue NF-e, CT-e and DC-e. See Companies.

How an integration works

  1. Get credentials and subscribe. Apply for an application and receive its app_secret. It is displayed only once; keep it server-side. The platform then subscribes the application to the endpoints you need; calling an endpoint you are not subscribed to returns HTTP 403 with code 10009005.
  2. Verify your signature. Every request is signed with MD5(token + path + body + timestamp) and carries the token, timestamp and sign headers. Make Echo test your first call: it validates the whole signing pipeline and returns the identity of your application.
  3. Integrate by domain. Issuing integrations register a company, link its certificate, register a webhook and then issue documents. Verification and identity integrations only need the signed call, plus a webhook to receive verification verdicts.

Where to start

  • Quick start: the five calls of an issuing integration, with runnable curl examples.
  • Authentication: credential model, signing rules, known signing vectors and reference implementations in five languages.
  • General conventions: response shapes, error typing, idempotency, rate limits, localization and data types.
  • Environments: base URL and how a company moves from the test environment to production.

Note: every endpoint lives under https://api.v2.tffiscal.com/openapi/.