Import Tax API (Remessa Conforme)

Calculate Brazilian import taxes (II and ICMS) for cross-border e-commerce shipments under the Remessa Conforme program (up to US$3,000).

Overview

This API applies exclusively to the Remessa Conforme program — Brazil's simplified tax regime for international e-commerce shipments to individuals, with a maximum value of US$3,000 per order.

When selling products to Brazilian consumers, merchants need to estimate the import taxes that will be applied at customs. This API calculates the two applicable taxes:

  • II (Imposto de Importação) — Federal import duty. 20% for purchases up to US$50, or 60% (with a US$20 deduction) for purchases between US$50.01 and US$3,000.
  • ICMS — State-level tax on imports. 17% in most states, 20% in nine states.

These are estimated values for informational purposes only. The actual taxes are calculated and collected by Brazil's Receita Federal at the time of customs clearance.

Calculate Import Tax

POST/merchant-api/import-tax/calculate

Calculates II and optionally ICMS for a given customs value. The value can be provided in any supported currency — it will be automatically converted to BRL using Glin's live exchange rates.

Request Parameters

Name Type Required Description
customsValuenumberCIF value (product price + freight + insurance) in the source currency.
currencystringISO 4217 currency code (e.g. "USD", "EUR", "GBP", "BRL"). The value is converted to BRL using Glin's live exchange rates.
destinationStatestring—2-letter Brazilian state code (e.g. "SP", "RJ", "BA"). Required for ICMS calculation. Omit to get only the import tax (II) breakdown.
remessaConformeboolean—Whether the platform is certified under Remessa Conforme. Defaults to true. Set to false for non-certified platforms (flat 60% II, no deduction). (default: true)

Example: Full Calculation (USD, with ICMS)

cURL
curl --request POST \
  --url https://pay.glin.com.br/merchant-api/import-tax/calculate \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "customsValue": 200.00,
    "currency": "USD",
    "destinationState": "SP",
    "remessaConforme": true
  }'
json
{
  "customsValue": 200.00,
  "currency": "USD",
  "customsValueBrl": 1050.00,
  "exchangeRate": 5.2500,
  "importTax": {
    "rate": 0.60,
    "base": 1050.00,
    "amount": 525.00,
    "deduction": 105.00,
    "remessaConforme": true
  },
  "icms": {
    "rate": 0.17,
    "base": 1897.59,
    "amount": 322.59,
    "destinationState": "SP"
  },
  "totalTaxesBrl": 847.59,
  "totalWithTaxesBrl": 1897.59,
  "effectiveTaxRate": 0.8072,
  "disclaimer": "Valores estimados para fins informativos..."
}

Example: BRL Input

When sending values in BRL, no currency conversion is applied:

cURL
curl --request POST \
  --url https://pay.glin.com.br/merchant-api/import-tax/calculate \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "customsValue": 100.00,
    "currency": "BRL",
    "destinationState": "SP",
    "remessaConforme": true
  }'
json
{
  "customsValue": 100.00,
  "currency": "BRL",
  "customsValueBrl": 100.00,
  "exchangeRate": 1,
  "importTax": {
    "rate": 0.20,
    "base": 100.00,
    "amount": 20.00,
    "deduction": 0,
    "remessaConforme": true
  },
  "icms": {
    "rate": 0.17,
    "base": 144.58,
    "amount": 24.58,
    "destinationState": "SP"
  },
  "totalTaxesBrl": 44.58,
  "totalWithTaxesBrl": 144.58,
  "effectiveTaxRate": 0.4458,
  "disclaimer": "Valores estimados para fins informativos..."
}

Example: Import Tax Only (no ICMS)

Omit destinationState to get only the II breakdown:

cURL
curl --request POST \
  --url https://pay.glin.com.br/merchant-api/import-tax/calculate \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "customsValue": 30.00,
    "currency": "USD"
  }'
json
{
  "customsValue": 30.00,
  "currency": "USD",
  "customsValueBrl": 157.50,
  "exchangeRate": 5.2500,
  "importTax": {
    "rate": 0.20,
    "base": 157.50,
    "amount": 31.50,
    "deduction": 0,
    "remessaConforme": true
  },
  "icms": null,
  "totalTaxesBrl": 31.50,
  "totalWithTaxesBrl": 189.00,
  "effectiveTaxRate": 0.2000,
  "disclaimer": "Valores estimados para fins informativos..."
}

Response Fields

Top-Level Fields

Name Type Required Description
customsValuenumberOriginal CIF value in the source currency.
currencystringSource currency code provided in the request.
customsValueBrlnumberCIF value converted to BRL.
exchangeRatenumberExchange rate used for conversion (BRL per source currency unit). Returns 1 when currency is BRL.
importTaxobjectImport tax (II) breakdown.
icmsobject—ICMS breakdown. Only present when destinationState is provided.
totalTaxesBrlnumberTotal taxes in BRL (II + ICMS if applicable).
totalWithTaxesBrlnumberTotal landed cost in BRL (CIF + all taxes).
effectiveTaxRatenumberEffective tax rate as a decimal (totalTaxesBrl / customsValueBrl).
disclaimerstringLegal disclaimer that values are estimates.

Import Tax (II) Object

Name Type Required Description
ratenumberII rate applied: 0.20 (20%) for purchases up to US$50, or 0.60 (60%) for US$50.01 to US$3,000.
basenumberTax base in BRL (the customs value converted to BRL).
amountnumberII amount in BRL after applying rate and deduction.
deductionnumberDeduction in BRL. For Remessa Conforme purchases above US$50, this is the BRL equivalent of US$20.
remessaConformebooleanWhether Remessa Conforme rates were applied.

ICMS Object

Only present when destinationState is provided in the request.

Name Type Required Description
ratenumberICMS rate: 0.17 (17%) for most states, or 0.20 (20%) for AC, AL, BA, CE, PB, PI, RN, RR, SE.
basenumberICMS base in BRL: (customsValueBrl + iiAmount) / (1 - icmsRate).
amountnumberICMS amount in BRL.
destinationStatestringThe state code used for the calculation.

Tax Rules Reference

Import Tax (II) Rates

Customs ValueRemessa ConformeNon-Certified
Up to US$5020%60%
US$50.01 to US$3,00060% minus US$20 deduction60% (no deduction)

ICMS Rates by State

Most states apply 17% ICMS. The following nine states apply 20% (effective April 1, 2025):

AC, AL, BA, CE, PB, PI, RN, RR, SE

ICMS Calculation

text
ICMS Base = (customsValueBrl + iiAmount) / (1 - icmsRate)
ICMS = ICMS Base x icmsRate

Notes

You can use this API to display estimated total costs to your customers before they complete a purchase, helping them understand the full landed cost of their order.

Exchange rates are fetched from Glin's live rate system. When sending values in a foreign currency (USD, EUR, etc.), the response includes the exchangeRate used for conversion so you can verify the calculation.

The US$50 threshold and US$20 deduction are defined by law in USD. When you send values in other currencies (including BRL), the system uses the current USD/BRL exchange rate to convert these thresholds for comparison.