TF Fiscal

REST · JSON · 102 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

HeaderTypeDescription
tokenstringIssuing company token
signstringMD5 signature: MD5(token + path + body + timestamp)
timestampstringUnix timestamp in seconds (5-minute window)

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

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

API categories