Brazil DANFSe & Tax Reform RTC (x402)

v2.7.1
io.github.brunopompeo1/br-danfse-rtc-x402 Checked 1 hour ago Published 6 days ago

Brazil DANFSe Nacional HTML & Tax Reform CBS/IBS/ISS (LC 214/2025) engine via x402 Base USDC.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

calculate_rtc_official Official CBS/IBS/ISS calculator (LC 214/2025, RFB Base V0073)

Computes Brazilian consumption-tax reform figures for one amount or a batch of up to 50 lines: it resolves the official Receita Federal cClassTrib classification from a code, NBS, NCM, LC 116 code or sector alias, applies the legal CBS/IBS reduction, the transition rates of the chosen year from 2026 to 2033 and the ISS phase-down, and returns the amounts due, the effective rates, the saving versus full taxation, a calculation trail and the ready-to-embed gIBSCBS XML group. It also simulates Simples Nacional DAS with the annex, revenue bracket and Fator R, and tells you how much CBS/IBS credit…

generate_danfse_rtc Generate the national NFS-e DANFSe with the RTC calculation

Produces the printable DANFSe of the Brazilian national NFS-e as self-contained HTML, with the access key, document number and verification code, and embeds the same official CBS/IBS/ISS calculation the engine performs from the Receita Federal Base V0073 tables. It accepts either structured provider, taker and service objects or a raw NFS-e XML (national or ABRASF standard) that it parses for you. Use it when a human-readable or archivable fiscal document is the deliverable: attaching an invoice to an email, publishing a customer portal page, or filing a PDF. Do not use it when you only need t…

rtc_lookup_official_tables Browse the official RFB RTC tables (free, no payment)

Returns the reference data behind the calculator at no charge: the table-set metadata, the full 2026 to 2033 transition schedule with nominal CBS and IBS rates per year, the headline sector reductions with their cClassTrib code and the LC 214/2025 article that grants them, every accepted sector alias, and the official Simples Nacional activity list. Passing a cClassTrib code instead resolves that single classification. Use it to discover which classifier to send to calculate_rtc_official, to validate a code before pricing, or to explain a reduction with its legal basis. Do not use it to tax an…

ParameterTypeDescription
cClassTribstringOptional 6-digit cClassTrib code to resolve on its own, for example '200046'. Omit it to receive the complete table set instead of a single record.