TF Fiscal

ICMS in Depth

The state tax on circulation: how it is computed, the rate system, tax substitution and the interstate differential, plus the CSOSN / CST tables split by regime

ICMS (Imposto sobre Circulação de Mercadorias e Serviços) is Brazil's heaviest and most intricate tax: each of the 27 states legislates its own version on goods, interstate transport and communication services. It is non-cumulative (input credits), tax-inclusive (the tax is part of its own base) and subject to numerous state exceptions: tax substitution (ST), base reductions, deferral, exemptions and the interstate differential (DIFAL).

Computation and rates

  • Tax-inclusive base: base = price (which already contains ICMS) + freight + insurance + other charges − discounts; IPI joins the base when selling to a final consumer. A nominal 18% is an effective ~21.95% on the net price.
  • Internal rates: set by each state, mostly 17%–20% (São Paulo 18%, Rio 20% plus 2% FCP, Minas 18%…); “non-essential” goods such as tobacco, alcohol and cosmetics reach 25%–35%.
  • Interstate rates: 12% in general; 7% from the South and Southeast (except Espírito Santo) to the North, Northeast, Centre-West and Espírito Santo; imported goods (origin 1, 2, 3, 8) always 4%.
  • DIFAL: on interstate sales to non-taxpayers (individuals, companies without ICMS registration), the difference between the destination internal rate and the interstate rate goes to the destination state and is paid by the seller; Simples (CRT 1 / 4) is exempt (ADI 5469), CRT 2 / 3 must compute it.
  • FCP (poverty fund surcharge): some states add 1%–2% on certain goods; on interstate sales it follows the DIFAL to the destination state.
  • Tax substitution (ST): for listed goods (identified by CEST), the ICMS of the whole chain is withheld once by the manufacturer or importer on a base marked up by the MVA; downstream resellers use CST 60 / CSOSN 500 and charge nothing.
  • Base reduction, exemption, deferral, suspension: granted by each state per product, mapped to CST 20 / 40 / 51 / 50 under the regular regime; Simples has no such split and uses CSOSN 400 / 300 for non-taxed and immune.

The regime decides between CSOSN and CST

CRTRegimeICMS codeCompany invoice_typeDIFAL
1Simples NacionalCSOSN · 3simples_nacional / 1Exempt
2Simples Nacional above the state sub-limitCST · 2simples_nacional_excesso / 2Due
3Regular regime (Lucro Real / Presumido)CST · 2tributacao_normal / lucro_normal / 3Due
4MEICSOSN · 3simples / 4Exempt
The platform validates locally that code length matches the regime: CRT 1 / 4 sending a CST, or CRT 2 / 3 sending a CSOSN, is rejected with the reason and never forwarded (it would be rejected with 590 / 591 and consume the CNPJ's call quota). No check when invoice_type is outside the table.

Simples Nacional: CSOSN table

CRT 1 and 4. Send 3 digits in icms.situacao_tributaria; all 10 are supported.

CSOSNMeaningWhen to use
101Taxed under Simples with credit allowedSale to a regular-regime taxpayer passing on the ICMS credit; fill aliquota_credito (1.25%–3.95% by revenue band).
102Taxed under Simples without creditMost common: sales to consumers, non-taxpayers, or any sale without credit transfer.
103ICMS exemption for the revenue bandWhen the state exempts the lower revenue bands.
201Credit allowed, ICMS-ST withheldSelling ST goods as the substitute while passing on the credit.
202No credit, ICMS-ST withheldSelling ST goods as the substitute; the usual ST case.
203Exempt for the band, ICMS-ST withheld103 combined with ST.
300ImmuneConstitutional immunity: books, newspapers, periodicals and their paper; exports.
400Not taxedOutside ICMS: non-sale dispatches such as gifts, samples, repairs.
500ICMS already charged via ST or advance paymentReselling ST goods; pair with CFOP 5405 / 6404, optionally with withheld values (v_bc_st_ret, v_icms_st_ret).
900OthersWhen nothing above fits: imports, cases needing base and amount together.

Regular regime: CST table

CRT 2 and 3. Send 2 digits in icms.situacao_tributaria; the XML prefixes the origin to make 3 digits. All 15 are supported.

CSTMeaningWhen to use
00Fully taxedMost common regular sale; fill aliquota.
10Taxed with ICMS-ST withheldSelling ST goods as the substitute; fill aliquota_mva, aliquota_icms_st.
20Reduced calculation baseState base reduction; fill aliquota_reducao (reduction %).
30Exempt or not taxed, with ICMS-ST withheldOwn operation exempt but ST withheld for the next link.
40ExemptExplicitly exempt by state law; may carry motivo_desoneracao and valor_desoneracao.
41Not taxedOutside the ICMS scope; common for exports.
50SuspensionTemporary dispatches: repair, demonstration, toll manufacturing.
51DeferralTax deferred to a later link; fill aliquota_diferimento.
60ICMS already charged via STReselling ST goods; pair with CFOP 5405 / 6404.
70Reduced base with ICMS-ST withheld20 combined with 10.
90OthersWhen nothing above fits.
02 · 15 · 53 · 61Single-phase fuel taxation seriesFuel sector only (02 own, 15 with withholding, 53 deferred, 61 already charged); fill ad_rem_icms.

Product origin (origem)

Field products[].origem, required under both regimes. It drives the interstate rate (4% for imported goods) and becomes the first digit of the CST/CSOSN in the XML.

ValueMeaning
0National, except 3, 4, 5 and 8
1Foreign, direct import (except 6)
2Foreign, bought on the domestic market (except 7)
3National, import content above 40% and up to 70%
4National, made under basic production process rules
5National, import content of 40% or less
6Foreign, direct import, no national equivalent (CAMEX list)
7Foreign, bought domestically, no national equivalent (CAMEX list)
8National, import content above 70%

Platform fields (category icms[] row / inline impostos.icms)

FieldPurpose
cenario · tipo_pessoaRow keys: scenario and person type, see below.
codigo_cfop · situacao_tributariaOperation code and CST/CSOSN; required.
aliquotaICMS rate (%).
aliquota_reducaoBase reduction % (CST 20 / 70).
aliquota_fcpFCP surcharge rate (%).
aliquota_mva · aliquota_icms_st · aliquota_reducao_st · aliquota_fcp_stWhen withholding ST as the substitute: MVA mark-up, ST rate, ST base reduction, FCP on ST (CST 10 / 30 / 70, CSOSN 201 / 202 / 203).
v_bc_st_ret · v_icms_st_ret · v_icms_substituto · p_fcp_st_ret · v_bc_fcp_st_ret · v_fcp_st_retWhen reselling ST goods (CST 60 / CSOSN 500): base and amounts already withheld upstream.
aliquota_creditoCredit rate passed to the buyer under Simples (CSOSN 101 / 201).
aliquota_diferimentoDeferral % (CST 51).
motivo_desoneracao · valor_desoneracaoExemption reason code and waived amount (CST 40 / 41 / 50 / 90).
beneficio_fiscal[]State tax benefit codes: [{"estado":"SP","codigo":"SP800001"}], written to cBenef in the XML.
disable_difal · difal_desconta_icms_inter · difal_base_por_dentro · v_bc_uf_destDIFAL controls: disable it; use the “double tax-inclusive” base net of interstate ICMS (most states' method); or pass the destination base directly.
desconta_icms_pis_cofinsWhen true, subtract the line's ICMS from the PIS/COFINS base (Supreme Court Tema 69).

Scenarios and person type in the category

cenarioMeaning
saida_dentro_estadoOutbound, recipient in the same state
saida_fora_estadoOutbound, recipient in another state
entrada_dentro_estadoInbound, counterparty in the same state
entrada_fora_estadoInbound, counterparty in another state
padraoDefault row when no specific scenario matches
  • Lookup order: current scenario → padrao → legacy saida_dentro_estado / saida_fora_estado; each step filters by tipo_pessoa (fisica / juridica) first.
  • Interstate sales to individuals need the saida_fora_estado + fisica row with CFOP 6108 and codes, otherwise the company row is used.
  • Import (transaction_type = 2) ignores scenarios, takes the first record and prefers CFOP 3.xxx; export (= 3) ignores tipo_pessoa.
  • If no row matches, issuance fails and the error names the missing cenario and tipo_pessoa.

Recommended combinations

OperationSimples Nacional (CRT 1 / 4)Regular regime (CRT 3)
Regular saleCSOSN 102(101 + aliquota_credito)CST 00 + aliquota
Resale of ST goodsCSOSN 500 · CFOP 5405 / 6404CST 60 · CFOP 5405 / 6404
Withholding ST as the substituteCSOSN 202 / 201 · MVACST 10 · MVA
Interstate sale to individuals (B2C)CSOSN 102 · CFOP 6108 · 免 DIFALCST 00 · CFOP 6108 · DIFAL + FCP
Non-sale dispatch (gift, sample, repair…)CSOSN 400CST 41(送修 50)
ExportCSOSN 300 · CFOP 7101 / 7102CST 41 · CFOP 7101 / 7102
Import inboundCSOSN 900 · CFOP 3102CST 00 · CFOP 3102

Rates, reliefs and ST lists are set by each state and change often; figures here are typical values, and your accountant and state rules prevail. For CFOP choices see “CFOP by Scenario”.