TF Fiscal

REST · JSON · 104 endpoints

TF Fiscal API

Complete API for issuing, consulting, and canceling Electronic Invoices (NF-e) in Brazil. Supports automatic tax calculation (ICMS, IPI, PIS/COFINS), XML generation, tax authority authorization, and integration with management systems. Currently supports invoice issuance for products throughout Brazilian territory.

Base URL (Production)
https://api.tffiscal.com

Authentication & signing

Required headers

tokenstringstringIssuing company token
signstringstringMD5 signature: MD5(token + path + body + timestamp)
timestampstringstringUnix timestamp in seconds (5-minute window)

The API uses two kinds of token, an integrator token and a company token; see Authentication & signing for their purpose and origin.

Signature

sign = md5(token + path + body + timestamp)

# token: the company token
# path: request path; include the query string on GET
# body: raw request body with all CR/LF removed; empty string on GET
# timestamp: Unix seconds, valid for 5 minutes
# result: 32 lowercase hex chars

Example · cURL

# sign = md5(token + path + body + timestamp)
# Template generated from the endpoint path; replace the placeholders
curl -X POST "https://api.tffiscal.com/api/invoice/create" \
  -H "Content-Type: application/json" \
  -H "token: $TOKEN" \
  -H "timestamp: $TIMESTAMP" \
  -H "sign: $SIGN" \
  -d @body.json

System Flow

  1. 1Input Data
    • Customer Information
    • Product Data
    • Fiscal Information
    • Transport Data
  2. 2Processing
    • Data validation
    • Tax calculation
    • XML generation
    • tax authority authorization
  3. 3Output
    • Invoice XML
    • Invoice PDF
    • DANFE (Auxiliary Document)
    • Authorization status

API categories