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
/merchant-api/import-tax/calculateCalculates 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 |
|---|---|---|---|
customsValue | number | CIF value (product price + freight + insurance) in the source currency. | |
currency | string | ISO 4217 currency code (e.g. "USD", "EUR", "GBP", "BRL"). The value is converted to BRL using Glin's live exchange rates. | |
destinationState | string | — | 2-letter Brazilian state code (e.g. "SP", "RJ", "BA"). Required for ICMS calculation. Omit to get only the import tax (II) breakdown. |
remessaConforme | boolean | — | 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 --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
}'{
"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 --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
}'{
"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 --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"
}'{
"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 |
|---|---|---|---|
customsValue | number | Original CIF value in the source currency. | |
currency | string | Source currency code provided in the request. | |
customsValueBrl | number | CIF value converted to BRL. | |
exchangeRate | number | Exchange rate used for conversion (BRL per source currency unit). Returns 1 when currency is BRL. | |
importTax | object | Import tax (II) breakdown. | |
icms | object | — | ICMS breakdown. Only present when destinationState is provided. |
totalTaxesBrl | number | Total taxes in BRL (II + ICMS if applicable). | |
totalWithTaxesBrl | number | Total landed cost in BRL (CIF + all taxes). | |
effectiveTaxRate | number | Effective tax rate as a decimal (totalTaxesBrl / customsValueBrl). | |
disclaimer | string | Legal disclaimer that values are estimates. |
Import Tax (II) Object
| Name | Type | Required | Description |
|---|---|---|---|
rate | number | II rate applied: 0.20 (20%) for purchases up to US$50, or 0.60 (60%) for US$50.01 to US$3,000. | |
base | number | Tax base in BRL (the customs value converted to BRL). | |
amount | number | II amount in BRL after applying rate and deduction. | |
deduction | number | Deduction in BRL. For Remessa Conforme purchases above US$50, this is the BRL equivalent of US$20. | |
remessaConforme | boolean | Whether Remessa Conforme rates were applied. |
ICMS Object
Only present when destinationState is provided in the request.
| Name | Type | Required | Description |
|---|---|---|---|
rate | number | ICMS rate: 0.17 (17%) for most states, or 0.20 (20%) for AC, AL, BA, CE, PB, PI, RN, RR, SE. | |
base | number | ICMS base in BRL: (customsValueBrl + iiAmount) / (1 - icmsRate). | |
amount | number | ICMS amount in BRL. | |
destinationState | string | The state code used for the calculation. |
Tax Rules Reference
Import Tax (II) Rates
| Customs Value | Remessa Conforme | Non-Certified |
|---|---|---|
| Up to US$50 | 20% | 60% |
| US$50.01 to US$3,000 | 60% minus US$20 deduction | 60% (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
ICMS Base = (customsValueBrl + iiAmount) / (1 - icmsRate)
ICMS = ICMS Base x icmsRateNotes
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.