# ERP transactions

Source: https://developer.avalara.com/goods-calculation-en/transactions_model/erp_transactions/

This section presents all the ERP transactions needed for your integration.

## Sales transactions

This section provides all mandatory sales transactions to obtain the Goods Calculations badge. It is important to understand your scenarios, map the attributes, and call our calculation API so you can better use our solution according to your business needs.

**Advice:** The "taxCode" attribute may be necessary to resolve an ambiguity, as explained in the Calculation Rules section, according to the chosen NCM code and the applicability of Brazilian legislation.

## Interstate sale for non-ICMS taxpayer (final consumer)

State From

GO

State To

ES

hsCode

4901.10.00

### Payload request

[![Closed](https://avalara-devdocs-prod.mcoutput.com/goods-calculation-en/Skins/Default/Stylesheets/Images/transparent.gif)View example](javascript:void\(0\);)

```
 {                    "header": {                         "transactionDate": "2020-10-06",                         "amountCalcType": "gross",                         "documentCode": "INTEROUT001",                         "messageType": "goods",                         "eDocCreatorType": "self",                         "eDocCreatorPerspective": true,                         "companyLocation": "",                         "operationType": "",                         "locations": {                              "establishment": {                                   "activitySector": {                                        "type": "activityLine",                                        "code": "industry"                                   },                                   "taxesSettings": {                                        "icmsTaxPayer": true                                   },                                   "taxRegime": "realProfit",                                   "entityType": "business",                                   "address": {                                        "zipcode": "74055160"                                   },                                   "type": "business",                                   "federalTaxId": "999999999"                              },                              "entity": {                                   "activitySector": {                                        "type": "activityLine",                                        "code": "finalConsumer"                                   },                                   "taxesSettings": {                                        "icmsTaxPayer": false                                   },                                   "taxRegime": "individual",                                   "entityType": "individual",                                   "stateTaxId": "",                                   "address": {                                        "zipcode": "29024047"                                   },                                   "type": "individual",                                   "federalTaxId": "999999999"                              }                         }                    },                    "lines": [                         {                              "lineCode": 0,                              "operationType": "standardSales",                              "lineAmount": 100,                              "itemCode": 0,                              "useType": "use or consumption",                              "numberOfItems": 1,                              "otherCostAmount": 0,                              "freightAmount": 0,                              "insuranceAmount": 0,                              "lineTaxedDiscount": 0,                              "unitAmount": 100,                              "subjectToIPIonInbound": false,                              "itemDescriptor": {                                   "taxCode": "",                                   "hsCode": "4901.10.00",                                   "isIcmsStSubstitute": false,                                   "source": "0",                                   "productType": "FOR PRODUCT",                                   "manufacturerEquivalent": false,                                   "unitIPIfactor": 1,                                   "unitIcmsfactor": 1,                                   "unitIcmsStfactor": 1,                                   "unitPisCofinsfactor": 1,                                   "comexTaxUnitFactor": 1                              },                              "customProperties": [],                              "goods": {                              }                         }                    ]                    } 
```

### Payload response

[![Closed](https://avalara-devdocs-prod.mcoutput.com/goods-calculation-en/Skins/Default/Stylesheets/Images/transparent.gif)View example](javascript:void\(0\);)

```
 {                    "header": {                       "transactionDate": "2020-10-06",                       "amountCalcType": "gross",                       "documentCode": "INTEROUT001",                       "messageType": "goods",                       "eDocCreatorType": "self",                       "eDocCreatorPerspective": true,                       "companyLocation": "",                       "operationType": "",                       "locations": {                           "establishment": {                               "activitySector": {                                   "type": "activityLine",                                   "code": "industry"                               },                               "taxesSettings": {                                   "icmsTaxPayer": true,                                   "enableCprb": false,                                   "usesInssCprbToGrossValue": false,                                   "pisCofinsIcmsTaxRelief": false                               },                               "taxRegime": "realProfit",                               "entityType": "business",                               "address": {                                   "zipcode": "74055160",                                   "cityCode": 5208707,                                   "countryCode": "0",                                   "country": "BRA",                                   "state": "GO",                                   "cityName": "Goiânia"                               },                               "type": "business",                               "federalTaxId": "999999999"                           },                           "entity": {                               "activitySector": {                                   "type": "activityLine",                                   "code": "finalConsumer"                               },                               "taxesSettings": {                                   "icmsTaxPayer": false,                                   "enableCprb": false,                                   "usesInssCprbToGrossValue": false,                                   "pisCofinsIcmsTaxRelief": false                               },                               "taxRegime": "individual",                               "entityType": "individual",                               "stateTaxId": "",                               "address": {                                   "zipcode": "29024047",                                   "cityCode": 3205309,                                   "countryCode": "0",                                   "country": "BRA",                                   "state": "ES",                                   "cityName": "Vitória"                               },                               "type": "individual",                               "federalTaxId": "999999999"                           }                       },                       "accountId": "",                       "subscriptionId": "",                       "goods": {                           "class": "VENDA PRODUTO À NAO CONTRIBUINTE DE ICMS",                           "tpImp": "1"                       },                       "additionalInfo": {                           "complementaryInfo": "Trib aprox R$ 4,20 Federal e R$ 17,00 Estadual Fonte: IBPT\nValor total do ICMS relativo ao Fundo de Combate à Pobreza (FCP) para a UF de destino: R$ 0,00\nValor total do ICMS de partilha para a UF do destinatário: R$ 5,00\nValor total do ICMS de partilha para a UF do remetente: R$ 0,00\nIPI não tributado conforme: \"Decreto nº 8.950/2016\"\nPIS/COFINS com alíquota zero conforme: \"Lei nº 10.865/2004, Artigo 28, Inciso VI, incluído pela Lei nº 11.033/2004\"\nICMS/GO_Decreto nº 4.852/1997, Artigo 20, Inciso II"                       }                    },                    "lines": [                       {                           "id": 1602011158411,                           "lineCode": 0,                           "operationType": "standardSales",                           "lineAmount": 100,                           "itemCode": "0",                           "useType": "use or consumption",                           "numberOfItems": 1,                           "otherCostAmount": 0,                           "freightAmount": 0,                           "insuranceAmount": 0,                           "lineTaxedDiscount": 0,                           "unitAmount": 100,                           "subjectToIPIonInbound": false,                           "itemDescriptor": {                               "taxCode": "",                               "hsCode": "4901.10.00",                               "isIcmsStSubstitute": false,                               "source": "0",                               "productType": "FOR PRODUCT",                               "manufacturerEquivalent": false,                               "unitIPIfactor": 1,                               "unitIcmsfactor": 1,                               "unitIcmsStfactor": 1,                               "unitPisCofinsfactor": 1,                               "comexTaxUnitFactor": 1,                               "description": "0"                           },                           "customProperties": [],                           "goods": {                               "indTotType": true,                               "entityIcmsStSubstitute": "no",                               "subjectToIPIonInbound": false                           },                           "overwrite": "no",                           "warnings": [                               {                                   "id": "83714234-6adb-4997-84be-2cc8f9ec5e87",                                   "code": "WC003",                                   "citation": "Subject to PIS Benefits: \"PIS_Constituição Federal de 1988, Artigo 150, Inciso VI, Alínea d\"",                                   "description": "Sem prejuízo de outras garantias asseguradas ao contribuinte, é vedado à União, aos Estados, ao Distrito Federal e aos Municípios instituir impostos sobre livros, jornais, periódicos e o papel destinado a sua impressão",                                   "isCustomCitation": false                               },                               {                                   "id": "c0291665-0cfe-4dfc-9795-f85bf67ea9d3",                                   "code": "WC003",                                   "citation": "Subject to COFINS Benefits: \"COFINS_Constituição Federal de 1988, Artigo 150, Inciso VI, Alínea d\"",                                   "description": "Sem prejuízo de outras garantias asseguradas ao contribuinte, é vedado à União, aos Estados, ao Distrito Federal e aos Municípios instituir impostos sobre livros, jornais, periódicos e o papel destinado a sua impressão",                                   "isCustomCitation": false                               },                               {                                   "id": "07221f04-b4cb-47cc-a442-6e2b2eaaffdd",                                   "code": "WC001",                                   "citation": "Subject to ICMS Benefits: \"ICMS/GO_Decreto nº 4.852/1997, Artigo 79, Inciso I, Alínea d\"",                                   "description": "O imposto não incide sobre_a operação_com livro, jornal e periódico e o papel destinado a sua impressão.",                                   "isCustomCitation": false                               },                               {                                   "id": "a0deec50-5217-4654-9ddd-7f3864e90ca6",                                   "code": "WC001",                                   "citation": "Subject to ICMS_Inter Benefits: \"ICMS/GO_Decreto nº 4.852/1997, Artigo 79, Inciso I, Alínea d\"",                                   "description": "O imposto não incide sobre_a operação_com livro, jornal e periódico e o papel destinado a sua impressão.",                                   "isCustomCitation": false                               },                               {                                   "id": "41b0d811-11d9-4b11-b744-cb5927ebf9d9",                                   "code": "WC001",                                   "citation": "Subject to ICMS Benefits: \"ICMS/ES_Decreto nº 1.090-R/2002, Artigo 4º, Inciso I\"",                                   "description": "Para aplicação do citado benefício fiscal é necessário observar as condições determinadas pelo RICMS/ES, Artigo 4 e seus parágrafos.",                                   "isCustomCitation": false                               }                           ],                           "lineUnitPrice": 100,                           "taxDetails": [                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Informative",                                       "impactOnNetAmount": "Informative",                                       "accounting": "none"                                   },                                   "taxType": "aproxtribFed",                                   "citation": "Trib aprox R$ 4,20 Federal e R$ 17,00 Estadual Fonte: IBPT",                                   "subtotalTaxable": 100,                                   "rate": 4.2,                                   "tax": 4.2,                                   "exemptionCode": "",                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Informative",                                       "impactOnNetAmount": "Informative",                                       "accounting": "none"                                   },                                   "taxType": "aproxtribState",                                   "subtotalTaxable": 100,                                   "rate": 17,                                   "tax": 17,                                   "exemptionCode": ""                               },                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "none"                                   },                                   "taxType": "cofins",                                   "citation": "PIS/COFINS com alíquota zero conforme: \"Lei nº 10.865/2004, Artigo 28, Inciso VI, incluído pela Lei nº 11.033/2004\"",                                   "citationId": "1f0f4a6e-4e31-41b5-9d6a-14f36bf00b34",                                   "subtotalTaxable": 100,                                   "rate": 0,                                   "tax": 0,                                   "exemptionCode": "",                                   "cst": "06",                                   "calcMode": "rate",                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "Goiás",                                   "jurisdictionType": "State",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "liability"                                   },                                   "taxType": "icms",                                   "citation": "ICMS/GO_Decreto nº 4.852/1997, Artigo 20, Inciso II",                                   "citationId": "533eab98-1224-401b-89dc-e7abfb7b96ed",                                   "subtotalTaxable": 100,                                   "rate": 12,                                   "tax": 12,                                   "exemptionCode": "",                                   "source": "0",                                   "cst": "00",                                   "modBC": "3",                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "Espírito Santo",                                   "jurisdictionType": "State",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "liability"                                   },                                   "taxType": "icmsDifaDest",                                   "citation": "Valor total do ICMS relativo ao Fundo de Combate à Pobreza (FCP) para a UF de destino: R$ 0,00\nValor total do ICMS de partilha para a UF do destinatário: R$ 5,00\nValor total do ICMS de partilha para a UF do remetente: R$ 0,00",                                   "subtotalTaxable": 100,                                   "rate": 17,                                   "tax": 5,                                   "exemptionCode": "",                                   "icmsInterPartRate": 100,                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "Goiás",                                   "jurisdictionType": "State",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "liability"                                   },                                   "taxType": "icmsDifaRemet",                                   "citation": "Valor total do ICMS relativo ao Fundo de Combate à Pobreza (FCP) para a UF de destino: R$ 0,00\nValor total do ICMS de partilha para a UF do destinatário: R$ 5,00\nValor total do ICMS de partilha para a UF do remetente: R$ 0,00",                                   "subtotalTaxable": 100,                                   "rate": 12,                                   "tax": 0,                                   "exemptionCode": "",                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Informative",                                       "impactOnNetAmount": "Informative",                                       "accounting": "none"                                   },                                   "taxType": "ipi",                                   "citation": "IPI não tributado conforme: \"Decreto nº 8.950/2016\"",                                   "citationId": "7e086799-cb88-499f-bd53-7a10cb02442b",                                   "subtotalTaxable": 100,                                   "rate": 0,                                   "tax": 0,                                   "exemptionCode": "",                                   "cst": "53",                                   "legalTaxClass": 999,                                   "calcMode": "rate",                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "none"                                   },                                   "taxType": "pis",                                   "citation": "PIS/COFINS com alíquota zero conforme: \"Lei nº 10.865/2004, Artigo 28, Inciso VI, incluído pela Lei nº 11.033/2004\"",                                   "citationId": "85119944-8343-471d-b952-d49f77cb4277",                                   "subtotalTaxable": 100,                                   "rate": 0,                                   "tax": 0,                                   "exemptionCode": "",                                   "cst": "06",                                   "calcMode": "rate",                                   "isCustomCitation": false                               }                           ],                           "cfop": 6107,                           "lineAdditionalInfo": "",                           "lineNetFigure": 83                       }                    ],                    "version": "3",                    "processingInfo": {                       "versionId": "21.3.5-rc.1",                       "duration": "6.113"                    },                    "summary": {                       "numberOfLines": 1,                       "totalLineAmounts": 100,                       "totalTaxedDiscounts": 0,                       "totalUntaxedDiscounts": 0,                       "totalInsurances": 0,                       "totalFreights": 0,                       "totalOtherCosts": 0,                       "totalUnTaxedOtherCosts": 0,                       "totalInvoice": 100,                       "taxByType": {                           "aproxtribFed": {                               "tax": 4.2,                               "subtotalTaxable": 100,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 4.2                                   }                               ]                           },                           "aproxtribState": {                               "tax": 17,                               "subtotalTaxable": 100,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 17                                   }                               ]                           },                           "cofins": {                               "tax": 0,                               "subtotalTaxable": 100,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 0                                   }                               ]                           },                           "icms": {                               "tax": 12,                               "subtotalTaxable": 100,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Goiás",                                       "jurisdictionType": "State",                                       "tax": 12                                   }                               ]                           },                           "icmsDifaDest": {                               "tax": 5,                               "subtotalTaxable": 100,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Espírito Santo",                                       "jurisdictionType": "State",                                       "tax": 5                                   }                               ]                           },                           "icmsDifaRemet": {                               "tax": 0,                               "subtotalTaxable": 100,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Goiás",                                       "jurisdictionType": "State",                                       "tax": 0                                   }                               ]                           },                           "ipi": {                               "tax": 0,                               "subtotalTaxable": 100,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 0                                   }                               ]                           },                           "pis": {                               "tax": 0,                               "subtotalTaxable": 100,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 0                                   }                               ]                           }                       }                    },                    "input": {                       "header": {                           "transactionDate": "2020-10-06",                           "amountCalcType": "gross",                           "documentCode": "INTEROUT001",                           "messageType": "goods",                           "eDocCreatorType": "self",                           "eDocCreatorPerspective": true,                           "companyLocation": "",                           "operationType": "",                           "locations": {                               "establishment": {                                   "activitySector": {                                       "type": "activityLine",                                       "code": "industry"                                   },                                   "taxesSettings": {                                       "icmsTaxPayer": true,                                       "enableCprb": false,                                       "usesInssCprbToGrossValue": false,                                       "pisCofinsIcmsTaxRelief": false                                   },                                   "taxRegime": "realProfit",                                   "entityType": "business",                                   "address": {                                       "zipcode": "74055160",                                       "cityCode": 5208707,                                       "countryCode": "0",                                       "country": "BRA",                                       "state": "GO",                                       "cityName": "Goiânia"                                   },                                   "type": "business",                                   "federalTaxId": "999999999"                               },                               "entity": {                                   "activitySector": {                                       "type": "activityLine",                                       "code": "finalConsumer"                                   },                                   "taxesSettings": {                                       "icmsTaxPayer": false,                                       "enableCprb": false,                                       "usesInssCprbToGrossValue": false,                                       "pisCofinsIcmsTaxRelief": false                                   },                                   "taxRegime": "individual",                                   "entityType": "individual",                                   "stateTaxId": "",                                   "address": {                                       "zipcode": "29024047",                                       "cityCode": 3205309,                                       "countryCode": "0",                                       "country": "BRA",                                       "state": "ES",                                       "cityName": "Vitória"                                   },                                   "type": "individual",                                   "federalTaxId": "999999999"                               }                           },                           "accountId": "",                           "subscriptionId": "",                           "goods": {}                       },                       "lines": [                           {                               "id": 1602011158411,                               "lineCode": 0,                               "operationType": "standardSales",                               "lineAmount": 100,                               "itemCode": "0",                               "useType": "use or consumption",                               "numberOfItems": 1,                               "otherCostAmount": 0,                               "freightAmount": 0,                               "insuranceAmount": 0,                               "lineTaxedDiscount": 0,                               "unitAmount": 100,                               "subjectToIPIonInbound": false,                               "itemDescriptor": {                                   "taxCode": "",                                   "hsCode": "4901.10.00",                                   "isIcmsStSubstitute": false,                                   "source": "0",                                   "productType": "FOR PRODUCT",                                   "manufacturerEquivalent": false,                                   "unitIPIfactor": 1,                                   "unitIcmsfactor": 1,                                   "unitIcmsStfactor": 1,                                   "unitPisCofinsfactor": 1,                                   "comexTaxUnitFactor": 1                               },                               "customProperties": [],                               "goods": {                                   "indTotType": true,                                   "entityIcmsStSubstitute": "default"                               },                               "overwrite": "no",                               "warnings": [                                   {                                       "id": "83714234-6adb-4997-84be-2cc8f9ec5e87",                                       "code": "WC003",                                       "citation": "Subject to PIS Benefits: \"PIS_Constituição Federal de 1988, Artigo 150, Inciso VI, Alínea d\"",                                       "description": "Sem prejuízo de outras garantias asseguradas ao contribuinte, é vedado à União, aos Estados, ao Distrito Federal e aos Municípios instituir impostos sobre livros, jornais, periódicos e o papel destinado a sua impressão",                                       "isCustomCitation": false                                   },                                   {                                       "id": "c0291665-0cfe-4dfc-9795-f85bf67ea9d3",                                       "code": "WC003",                                       "citation": "Subject to COFINS Benefits: \"COFINS_Constituição Federal de 1988, Artigo 150, Inciso VI, Alínea d\"",                                       "description": "Sem prejuízo de outras garantias asseguradas ao contribuinte, é vedado à União, aos Estados, ao Distrito Federal e aos Municípios instituir impostos sobre livros, jornais, periódicos e o papel destinado a sua impressão",                                       "isCustomCitation": false                                   },                                   {                                       "id": "07221f04-b4cb-47cc-a442-6e2b2eaaffdd",                                       "code": "WC001",                                       "citation": "Subject to ICMS Benefits: \"ICMS/GO_Decreto nº 4.852/1997, Artigo 79, Inciso I, Alínea d\"",                                       "description": "O imposto não incide sobre_a operação_com livro, jornal e periódico e o papel destinado a sua impressão.",                                       "isCustomCitation": false                                   },                                   {                                       "id": "a0deec50-5217-4654-9ddd-7f3864e90ca6",                                       "code": "WC001",                                       "citation": "Subject to ICMS_Inter Benefits: \"ICMS/GO_Decreto nº 4.852/1997, Artigo 79, Inciso I, Alínea d\"",                                       "description": "O imposto não incide sobre_a operação_com livro, jornal e periódico e o papel destinado a sua impressão.",                                       "isCustomCitation": false                                   },                                   {                                       "id": "41b0d811-11d9-4b11-b744-cb5927ebf9d9",                                       "code": "WC001",                                       "citation": "Subject to ICMS Benefits: \"ICMS/ES_Decreto nº 1.090-R/2002, Artigo 4º, Inciso I\"",                                       "description": "Para aplicação do citado benefício fiscal é necessário observar as condições determinadas pelo RICMS/ES, Artigo 4 e seus parágrafos.",                                       "isCustomCitation": false                                   }                               ]                           }                       ],                       "version": "3"                    }                    } 
```

## Interstate sale for ICMS taxpayer

State From

SP

State To

SP

hsCode

6109.10.00

cest

28.059.00

taxCode

Jeans059

### Payload request

[![Closed](https://avalara-devdocs-prod.mcoutput.com/goods-calculation-en/Skins/Default/Stylesheets/Images/transparent.gif)View example](javascript:void\(0\);)

```
 {                    "header": {                       "transactionDate": "2021-02-14",                       "amountCalcType": "gross",                       "documentCode": "CASO4",                       "messageType": "goods",                       "eDocCreatorType": "self",                       "eDocCreatorPerspective": true,                       "companyLocation": "123456",                       "operationType": "",                       "locations": {                           "establishment": {                               "activitySector": {                                   "type": "activityLine",                                   "code": "industry"                               },                               "taxesSettings": {                                   "icmsTaxPayer": true                               },                               "taxRegime": "estimatedProfit",                               "type": "business",                               "address": {                                   "zipcode": "04710010"                               },                               "federalTaxId": "999999999"                           },                           "entity": {                               "activitySector": {                                   "type": "activityLine",                                   "code": "retail"                               },                               "taxesSettings": {                                   "icmsTaxPayer": true                               },                               "taxRegime": "realProfit",                               "type": "business",                               "address": {                                   "zipcode": "29024047"                               },                               "federalTaxId": "999999999"                           }                       },                       "accountId": "",                       "subscriptionId": ""                    },                    "lines": [                       {                           "lineCode": "1",                           "operationType": "standardSales",                           "itemCode": "Item0",                           "useType": "resale",                           "usagePurpose": "",                           "numberOfItems": "1000",                           "orderNumber": "12",                           "orderItemNumber": "31",                           "lineUnitPrice": "100",                           "itemDescriptor": {                               "hsCode": "61091000",                               "taxCode": "Jeans059",                               "cest": "28.059.00",                               "isIcmsStSubstitute": false,                               "source": "0",                               "productType": "FOR PRODUCT",                               "manufacturerEquivalent": false,                               "unitIPIfactor": 1,                               "unitIcmsfactor": 1,                               "unitIcmsStfactor": 1,                               "unitPisCofinsfactor": 1,                               "comexTaxUnitFactor": 1                           },                           "id": 1597423940072,                           "customProperties": [],                           "goods": {                           }                       }                    ],                    "version": "3"                    } 
```

### Payload response

[![Closed](https://avalara-devdocs-prod.mcoutput.com/goods-calculation-en/Skins/Default/Stylesheets/Images/transparent.gif)View example](javascript:void\(0\);)

```
{                    "header": {                       "transactionDate": "2021-02-14",                       "amountCalcType": "gross",                       "documentCode": "CASO4",                       "messageType": "goods",                       "eDocCreatorType": "self",                       "eDocCreatorPerspective": true,                       "companyLocation": "123456",                       "operationType": "",                       "locations": {                           "establishment": {                               "activitySector": {                                   "type": "activityLine",                                   "code": "industry"                               },                               "taxesSettings": {                                   "icmsTaxPayer": true,                                   "enableCprb": false,                                   "usesInssCprbToGrossValue": false,                                   "pisCofinsIcmsTaxRelief": false                               },                               "taxRegime": "estimatedProfit",                               "type": "business",                               "address": {                                   "zipcode": "04710010",                                   "cityCode": 3550308,                                   "countryCode": "0",                                   "country": "BRA",                                   "state": "SP",                                   "cityName": "São Paulo"                               },                               "federalTaxId": "999999999"                           },                           "entity": {                               "activitySector": {                                   "type": "activityLine",                                   "code": "retail"                               },                               "taxesSettings": {                                   "icmsTaxPayer": true,                                   "enableCprb": false,                                   "usesInssCprbToGrossValue": false,                                   "pisCofinsIcmsTaxRelief": false                               },                               "taxRegime": "realProfit",                               "type": "business",                               "address": {                                   "zipcode": "29024047",                                   "cityCode": 3205309,                                   "countryCode": "0",                                   "country": "BRA",                                   "state": "ES",                                   "cityName": "Vitória"                               },                               "federalTaxId": "999999999"                           }                       },                       "accountId": "",                       "subscriptionId": "",                       "goods": {                           "class": "VENDA DE MERCADORIAS",                           "tpImp": "1"                       },                       "additionalInfo": {                           "complementaryInfo": "IPI com alíquota zero conforme: \"Decreto nº 8950/2016\"\nPIS/COFINS Lei nº 9.715/1998, Artigo 8º, inciso I\nPIS/COFINS Lei nº 9.718/1998, Artigo 8º\nICMS/SP_Decreto nº 45.490/2000, Artigo 52, Inciso II\nItem sujeito à subs. trib. conforme: \"ST/ES_Portaria SEFAZ nº 16-R/2019, Anexo Único, Item IX\""                       }                    },                    "lines": [                       {                           "lineCode": 1,                           "operationType": "standardSales",                           "itemCode": "Item0",                           "useType": "resale",                           "usagePurpose": "",                           "numberOfItems": 1000,                           "orderNumber": "12",                           "orderItemNumber": "31",                           "lineUnitPrice": 100,                           "itemDescriptor": {                               "hsCode": "61091000",                               "taxCode": "Jeans059",                               "cest": "28.059.00",                               "isIcmsStSubstitute": false,                               "source": "0",                               "productType": "FOR PRODUCT",                               "manufacturerEquivalent": false,                               "unitIPIfactor": 1,                               "unitIcmsfactor": 1,                               "unitIcmsStfactor": 1,                               "unitPisCofinsfactor": 1,                               "comexTaxUnitFactor": 1,                               "description": "Item0"                           },                           "id": 1597423940072,                           "customProperties": [],                           "goods": {                               "indTotType": true,                               "entityIcmsStSubstitute": "no",                               "subjectToIPIonInbound": false                           },                           "overwrite": "no",                           "warnings": [                               {                                   "id": "24b59ed0-9255-11eb-b688-038e793b71a9",                                   "code": "WC002",                                   "citation": "Subject to ICMS_Reduction Benefits: \"ICMS/SP_Decreto nº 45.490/2000, Anexo II, Artigo 52\"",                                   "description": "Para aplicação do citado benefício fiscal é necessário observar as condições determinadas pelo Artigo 51 e Anexo II, Artigo 52, RICMS/SP.",                                   "isCustomCitation": false                               }                           ],                           "lineAmount": 100000,                           "taxDetails": [                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "liability"                                   },                                   "taxType": "cofins",                                   "citation": "PIS/COFINS Lei nº 9.718/1998, Artigo 8º",                                   "citationId": "75a83922-7fb8-4f4e-8a0a-45426fd9249d",                                   "subtotalTaxable": 100000,                                   "rate": 3,                                   "tax": 3000,                                   "exemptionCode": "",                                   "cst": "01",                                   "calcMode": "rate",                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "São Paulo",                                   "jurisdictionType": "State",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "liability"                                   },                                   "taxType": "icms",                                   "citation": "ICMS/SP_Decreto nº 45.490/2000, Artigo 52, Inciso II",                                   "citationId": "669c8036-82af-4cf8-8c8f-fd5a9e65017b",                                   "subtotalTaxable": 100000,                                   "rate": 7,                                   "tax": 7000,                                   "exemptionCode": "",                                   "source": "0",                                   "cst": "10",                                   "modBC": "3",                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "Espírito Santo",                                   "jurisdictionType": "State",                                   "taxImpact": {                                       "impactOnFinalPrice": "Add",                                       "impactOnNetAmount": "Add",                                       "accounting": "liability"                                   },                                   "taxType": "icmsSt",                                   "citation": "Item sujeito à subs. trib. conforme: \"ST/ES_Portaria SEFAZ nº 16-R/2019, Anexo Único, Item IX\"",                                   "citationId": "dfcf6607-a371-4162-8369-1ca597e91a2b",                                   "subtotalTaxable": 135000,                                   "rate": 17,                                   "tax": 15950,                                   "exemptionCode": "",                                   "source": "0",                                   "cst": "10",                                   "modBC": "4",                                   "pMVA": 35,                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Add",                                       "impactOnNetAmount": "Add",                                       "accounting": "none"                                   },                                   "taxType": "ipi",                                   "citation": "IPI com alíquota zero conforme: \"Decreto nº 8950/2016\"",                                   "citationId": "18384774-ed65-4180-8f05-e822b155d99c",                                   "subtotalTaxable": 100000,                                   "rate": 0,                                   "tax": 0,                                   "exemptionCode": "",                                   "cst": "51",                                   "legalTaxClass": 999,                                   "calcMode": "rate",                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "liability"                                   },                                   "taxType": "pis",                                   "citation": "PIS/COFINS Lei nº 9.715/1998, Artigo 8º, inciso I",                                   "citationId": "fbc9dd41-6f48-4b7e-8d4f-13ad3f168e26",                                   "subtotalTaxable": 100000,                                   "rate": 0.65,                                   "tax": 650,                                   "exemptionCode": "",                                   "cst": "01",                                   "calcMode": "rate",                                   "isCustomCitation": false                               }                           ],                           "cfop": 6401,                           "lineAdditionalInfo": "",                           "lineNetFigure": 89350                       }                    ],                    "version": "3",                    "processingInfo": {                       "versionId": "21.3.5-rc.1",                       "duration": "3.487"                    },                    "summary": {                       "numberOfLines": 1,                       "totalLineAmounts": 100000,                       "totalTaxedDiscounts": 0,                       "totalUntaxedDiscounts": 0,                       "totalInsurances": 0,                       "totalFreights": 0,                       "totalOtherCosts": 0,                       "totalUnTaxedOtherCosts": 0,                       "totalInvoice": 115950,                       "taxByType": {                           "cofins": {                               "tax": 3000,                               "subtotalTaxable": 100000,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 3000                                   }                               ]                           },                           "icms": {                               "tax": 7000,                               "subtotalTaxable": 100000,                               "jurisdictions": [                                   {                                       "jurisdictionName": "São Paulo",                                       "jurisdictionType": "State",                                       "tax": 7000                                   }                               ]                           },                           "icmsSt": {                               "tax": 15950,                               "subtotalTaxable": 135000,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Espírito Santo",                                       "jurisdictionType": "State",                                       "tax": 15950                                   }                               ]                           },                           "ipi": {                               "tax": 0,                               "subtotalTaxable": 100000,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 0                                   }                               ]                           },                           "pis": {                               "tax": 650,                               "subtotalTaxable": 100000,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 650                                   }                               ]                           }                       }                    },                    "input": {                       "header": {                           "transactionDate": "2021-02-14",                           "amountCalcType": "gross",                           "documentCode": "CASO4",                           "messageType": "goods",                           "eDocCreatorType": "self",                           "eDocCreatorPerspective": true,                           "companyLocation": "123456",                           "operationType": "",                           "locations": {                               "establishment": {                                   "activitySector": {                                       "type": "activityLine",                                       "code": "industry"                                   },                                   "taxesSettings": {                                       "icmsTaxPayer": true,                                       "enableCprb": false,                                       "usesInssCprbToGrossValue": false,                                       "pisCofinsIcmsTaxRelief": false                                   },                                   "taxRegime": "estimatedProfit",                                   "type": "business",                                   "address": {                                       "zipcode": "04710010",                                       "cityCode": 3550308,                                       "countryCode": "0",                                       "country": "BRA",                                       "state": "SP",                                       "cityName": "São Paulo"                                   },                                   "federalTaxId": "999999999"                               },                               "entity": {                                   "activitySector": {                                       "type": "activityLine",                                       "code": "retail"                                   },                                   "taxesSettings": {                                       "icmsTaxPayer": true,                                       "enableCprb": false,                                       "usesInssCprbToGrossValue": false,                                       "pisCofinsIcmsTaxRelief": false                                   },                                   "taxRegime": "realProfit",                                   "type": "business",                                   "address": {                                       "zipcode": "29024047",                                       "cityCode": 3205309,                                       "countryCode": "0",                                       "country": "BRA",                                       "state": "ES",                                       "cityName": "Vitória"                                   },                                   "federalTaxId": "999999999"                               }                           },                           "accountId": "bdf71245-1288-4883-95a5-3a7530ea31af",                           "subscriptionId": "9fe9c37a-1da8-4b8e-9d1b-21207b21e9f9",                           "goods": {}                       },                       "lines": [                           {                               "lineCode": 1,                               "operationType": "standardSales",                               "itemCode": "Item0",                               "useType": "resale",                               "usagePurpose": "",                               "numberOfItems": 1000,                               "orderNumber": "12",                               "orderItemNumber": "31",                               "lineUnitPrice": 100,                               "itemDescriptor": {                                   "hsCode": "61091000",                                   "taxCode": "Jeans059",                                   "cest": "28.059.00",                                   "isIcmsStSubstitute": false,                                   "source": "0",                                   "productType": "FOR PRODUCT",                                   "manufacturerEquivalent": false,                                   "unitIPIfactor": 1,                                   "unitIcmsfactor": 1,                                   "unitIcmsStfactor": 1,                                   "unitPisCofinsfactor": 1,                                   "comexTaxUnitFactor": 1                               },                               "id": 1597423940072,                               "customProperties": [],                               "goods": {                                   "indTotType": true,                                   "entityIcmsStSubstitute": "default"                               },                               "overwrite": "no",                               "warnings": [                                   {                                       "id": "24b59ed0-9255-11eb-b688-038e793b71a9",                                       "code": "WC002",                                       "citation": "Subject to ICMS_Reduction Benefits: \"ICMS/SP_Decreto nº 45.490/2000, Anexo II, Artigo 52\"",                                       "description": "Para aplicação do citado benefício fiscal é necessário observar as condições determinadas pelo Artigo 51 e Anexo II, Artigo 52, RICMS/SP.",                                       "isCustomCitation": false                                   }                               ]                           }                       ],                       "version": "3"                    }                    } 
```

## Sale within the state

State From

SP

State To

SP

hsCode

61091000

### Payload request

[![Closed](https://avalara-devdocs-prod.mcoutput.com/goods-calculation-en/Skins/Default/Stylesheets/Images/transparent.gif)View example](javascript:void\(0\);)

```
 {                    "header": {                         "transactionDate": "2021-10-08",                         "amountCalcType": "gross",                         "documentCode": "Cenario1",                         "messageType": "goods",                         "companyLocation": "12345678",                         "operationType": "",                         "locations": {                              "establishment": {                                   "activitySector": {                                        "type": "activityLine",                                        "code": "industry"                                   },                                   "taxesSettings": {                                        "icmsTaxPayer": true                                   },                                   "taxRegime": "realProfit",                                    "address": {                                        "zipcode": "04709111"                                   },                                   "type": "business"                              },                              "entity": {                                   "activitySector": {                                        "type": "activityLine",                                        "code": "retail"                                   },                                   "taxesSettings": {                                        "icmsTaxPayer": true                                    },                                   "taxRegime": "estimatedProfit",                                   "address": {                                        "zipcode": "04710010"                                   },                                   "type": "business"                              }                         }                    },                    "lines": [                         {                              "lineCode": 0,                              "operationType": "standardSales",                              "lineUnitPrice": "200",                              "itemCode": 0,                              "useType": "resale",                              "numberOfItems": 1000,                              "otherCostAmount": 0,                              "freightAmount": 0,                              "insuranceAmount": 0,                              "lineTaxedDiscount": 0,                              "itemDescriptor": {                                   "hsCode": "61091000",                                   "source": "0",                                   "productType": "FOR PRODUCT"                              }                          }                    ]                    } 
```

### Payload response

[![Closed](https://avalara-devdocs-prod.mcoutput.com/goods-calculation-en/Skins/Default/Stylesheets/Images/transparent.gif)View example](javascript:void\(0\);)

```
 {                    "header": {                       "transactionDate": "2021-10-08",                       "amountCalcType": "gross",                       "documentCode": "Cenario1",                       "messageType": "goods",                       "companyLocation": "12345678",                       "operationType": "",                       "locations": {                           "establishment": {                               "activitySector": {                                   "type": "activityLine",                                   "code": "industry"                               },                               "taxesSettings": {                                   "icmsTaxPayer": true,                                   "enableCprb": false,                                   "usesInssCprbToGrossValue": false,                                   "pisCofinsIcmsTaxRelief": false                               },                               "taxRegime": "realProfit",                               "address": {                                   "zipcode": "04709111",                                   "cityCode": 3550308,                                   "countryCode": "0",                                   "country": "BRA",                                   "state": "SP",                                   "cityName": "São Paulo"                               },                               "type": "business"                           },                           "entity": {                               "activitySector": {                                   "type": "activityLine",                                   "code": "retail"                               },                               "taxesSettings": {                                   "icmsTaxPayer": true,                                   "enableCprb": false,                                   "usesInssCprbToGrossValue": false,                                   "pisCofinsIcmsTaxRelief": false                               },                               "taxRegime": "estimatedProfit",                               "address": {                                   "zipcode": "04710010",                                   "cityCode": 3550308,                                   "countryCode": "0",                                   "country": "BRA",                                   "state": "SP",                                   "cityName": "São Paulo"                               },                               "type": "business",                               "federalTaxId": ""                           }                       },                       "eDocCreatorType": "self",                       "eDocCreatorPerspective": true,                       "accountId": "",                       "subscriptionId": "",                       "goods": {                           "class": "VENDA DE PRODUÇÃO DO ESTABELECIMENTO",                           "tpImp": "1"                       },                       "additionalInfo": {                           "complementaryInfo": "IPI com alíquota zero conforme: \"Decreto nº 8950/2016\"\nPIS/COFINS Lei nº 10.637/2002, Artigo 2º\nPIS/COFINS Lei nº 10.833/2003, Artigo 2º\nICMS/SP_Decreto nº 45.490/2000, Artigo 52, Inciso I"                       }                    },                    "lines": [                       {                           "lineCode": 0,                           "operationType": "standardSales",                           "lineUnitPrice": 200,                           "itemCode": "0",                           "useType": "resale",                           "numberOfItems": 1000,                           "otherCostAmount": 0,                           "freightAmount": 0,                           "insuranceAmount": 0,                           "lineTaxedDiscount": 0,                           "itemDescriptor": {                               "hsCode": "61091000",                               "source": "0",                               "productType": "FOR PRODUCT",                               "description": "0"                           },                           "overwrite": "no",                           "warnings": [                               {                                   "id": "24b59ed0-9255-11eb-b688-038e793b71a9",                                   "code": "WC002",                                   "citation": "Subject to ICMS_Reduction Benefits: \"ICMS/SP_Decreto nº 45.490/2000, Anexo II, Artigo 52\"",                                   "description": "Para aplicação do citado benefício fiscal é necessário observar as condições determinadas pelo Artigo 51 e Anexo II, Artigo 52, RICMS/SP.",                                   "isCustomCitation": false                               }                           ],                           "goods": {                               "subjectToIPIonInbound": false,                               "entityIcmsStSubstitute": "no"                           },                           "lineAmount": 200000,                           "taxDetails": [                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "liability"                                   },                                   "taxType": "cofins",                                   "citation": "PIS/COFINS Lei nº 10.833/2003, Artigo 2º",                                   "citationId": "7b39643a-d430-4a3e-9777-2d0df2e2cdc5",                                   "subtotalTaxable": 200000,                                   "rate": 7.6,                                   "tax": 15200,                                   "exemptionCode": "",                                   "cst": "01",                                   "calcMode": "rate",                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "São Paulo",                                   "jurisdictionType": "State",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "liability"                                   },                                   "taxType": "icms",                                   "citation": "ICMS/SP_Decreto nº 45.490/2000, Artigo 52, Inciso I",                                   "citationId": "739fb456-8f94-4e33-b961-bf425874730a",                                   "subtotalTaxable": 200000,                                   "rate": 18,                                   "tax": 36000,                                   "exemptionCode": "",                                   "source": "0",                                   "cst": "00",                                   "modBC": "3",                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Add",                                       "impactOnNetAmount": "Add",                                       "accounting": "none"                                   },                                   "taxType": "ipi",                                   "citation": "IPI com alíquota zero conforme: \"Decreto nº 8950/2016\"",                                   "citationId": "18384774-ed65-4180-8f05-e822b155d99c",                                   "subtotalTaxable": 200000,                                   "rate": 0,                                   "tax": 0,                                   "exemptionCode": "",                                   "cst": "51",                                   "legalTaxClass": 999,                                   "calcMode": "rate",                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "liability"                                   },                                   "taxType": "pis",                                   "citation": "PIS/COFINS Lei nº 10.637/2002, Artigo 2º",                                   "citationId": "a8d00e75-5597-48ab-baa1-576ed5444da2",                                   "subtotalTaxable": 200000,                                   "rate": 1.65,                                   "tax": 3300,                                   "exemptionCode": "",                                   "cst": "01",                                   "calcMode": "rate",                                   "isCustomCitation": false                               }                           ],                           "cfop": 5101,                           "lineAdditionalInfo": "",                           "lineNetFigure": 145500                       }                    ],                    "version": "3",                    "processingInfo": {                       "versionId": "21.3.5-rc.1",                       "duration": "2.574"                    },                    "summary": {                       "numberOfLines": 1,                       "totalLineAmounts": 200000,                       "totalTaxedDiscounts": 0,                       "totalUntaxedDiscounts": 0,                       "totalInsurances": 0,                       "totalFreights": 0,                       "totalOtherCosts": 0,                       "totalUnTaxedOtherCosts": 0,                       "totalInvoice": 200000,                       "taxByType": {                           "cofins": {                               "tax": 15200,                               "subtotalTaxable": 200000,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 15200                                   }                               ]                           },                           "icms": {                               "tax": 36000,                               "subtotalTaxable": 200000,                               "jurisdictions": [                                   {                                       "jurisdictionName": "São Paulo",                                       "jurisdictionType": "State",                                       "tax": 36000                                   }                               ]                           },                           "ipi": {                               "tax": 0,                               "subtotalTaxable": 200000,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 0                                   }                               ]                           },                           "pis": {                               "tax": 3300,                               "subtotalTaxable": 200000,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 3300                                   }                               ]                           }                       }                    },                    "input": {                       "header": {                           "transactionDate": "2021-10-08",                           "amountCalcType": "gross",                           "documentCode": "Cenario1",                           "messageType": "goods",                           "companyLocation": "12345678",                           "operationType": "",                           "locations": {                               "establishment": {                                   "activitySector": {                                       "type": "activityLine",                                       "code": "industry"                                   },                                   "taxesSettings": {                                       "icmsTaxPayer": true,                                       "enableCprb": false,                                       "usesInssCprbToGrossValue": false,                                       "pisCofinsIcmsTaxRelief": false                                   },                                   "taxRegime": "realProfit",                                   "address": {                                       "zipcode": "04709111",                                       "cityCode": 3550308,                                       "countryCode": "0",                                       "country": "BRA",                                       "state": "SP",                                       "cityName": "São Paulo"                                   },                                   "type": "business"                               },                               "entity": {                                   "activitySector": {                                       "type": "activityLine",                                       "code": "retail"                                   },                                   "taxesSettings": {                                       "icmsTaxPayer": true,                                       "enableCprb": false,                                       "usesInssCprbToGrossValue": false,                                       "pisCofinsIcmsTaxRelief": false                                   },                                   "taxRegime": "estimatedProfit",                                   "address": {                                       "zipcode": "04710010",                                       "cityCode": 3550308,                                       "countryCode": "0",                                       "country": "BRA",                                       "state": "SP",                                       "cityName": "São Paulo"                                   },                                   "type": "business",                                   "federalTaxId": ""                               }                           },                           "eDocCreatorType": "self",                           "eDocCreatorPerspective": true,                           "accountId": "",                           "subscriptionId": "",                           "goods": {}                       },                       "lines": [                           {                               "lineCode": 0,                               "operationType": "standardSales",                               "lineUnitPrice": 200,                               "itemCode": "0",                               "useType": "resale",                               "numberOfItems": 1000,                               "otherCostAmount": 0,                               "freightAmount": 0,                               "insuranceAmount": 0,                               "lineTaxedDiscount": 0,                               "itemDescriptor": {                                   "hsCode": "61091000",                                   "source": "0",                                   "productType": "FOR PRODUCT"                               },                               "overwrite": "no",                               "warnings": [                                   {                                       "id": "24b59ed0-9255-11eb-b688-038e793b71a9",                                       "code": "WC002",                                       "citation": "Subject to ICMS_Reduction Benefits: \"ICMS/SP_Decreto nº 45.490/2000, Anexo II, Artigo 52\"",                                       "description": "Para aplicação do citado benefício fiscal é necessário observar as condições determinadas pelo Artigo 51 e Anexo II, Artigo 52, RICMS/SP.",                                       "isCustomCitation": false                                   }                               ]                           }                       ],                       "version": "3"                    }                    } 
```

## Reference complementary value e-invoice

State From

SP

State To

ES

hsCode

3917.21.00

### Payload request

[![Closed](https://avalara-devdocs-prod.mcoutput.com/goods-calculation-en/Skins/Default/Stylesheets/Images/transparent.gif)View example](javascript:void\(0\);)

```
 {                    "header":                    {                    "transactionDate":"2021-03-21T10:26:36Z",                    "amountCalcType":"net",                    "documentCode":"Complementary1",                    "goods":                    {                    "model":"55"                    },                    "messageType":"goods",                    "eDocCreatorType":"self",                    "eDocCreatorPerspective":true,                    "companyLocation":"123456",                    "locations":                    {                    "establishment":                    {                    "activitySector":                    {                    "type":"activityLine",                    "code":"importer"                    },                    "taxesSettings":                    {                    "icmsTaxPayer":true                    },                    "taxRegime":"realProfit",                    "type":"business",                    "address":                    {                    "zipcode":"04561-004",                    "state":"SP",                    "country":"BRA"                    }                    },                    "entity":                    {                    "activitySector":                    {                    "type":"activityLine",                    "code":"finalConsumer"                    },                    "taxesSettings":                    {                    "icmsTaxPayer":false                    },                    "taxRegime":"individual",                    "address":                    {                    "zipcode":"29024-047",                    "state":"ES",                    "country":"BRA"                    }                    }                    }                    },                    "lines":                    [                    {                    "id":"000010",                    "lineCode":"1",                    "operationType":"standardSales",                    "lineAmount":10.00,                    "useType":"use or consumption",                    "numberOfItems":1,                    "otherCostAmount":0.00,                    "freightAmount":0.00,                    "insuranceAmount":0.00,                    "lineTaxedDiscount":0.00,                    "itemDescriptor":                    {                    "hsCode":"3917.21.00",                    "source":"1",                    "productType":"FOR PRODUCT",                    "unitIPIfactor":1,                    "unitIcmsfactor":1,                    "unitIcmsStfactor":1,                    "unitPisCofinsfactor":1,                    "comexTaxUnitFactor":1                    }                    }                    ]                    } 
```

### Payload response

[![Closed](https://avalara-devdocs-prod.mcoutput.com/goods-calculation-en/Skins/Default/Stylesheets/Images/transparent.gif)View example](javascript:void\(0\);)

```
 {                    "header": {                       "transactionDate": "2021-03-21T10:26:36Z",                       "amountCalcType": "net",                       "documentCode": "Complementary1",                       "goods": {                           "model": "55",                           "idDest": 0,                           "tpEmis": "1",                           "class": "VENDA PRODUTO À NAO CONTRIBUINTE DE ICMS",                           "tpImp": "1"                       },                       "messageType": "goods",                       "eDocCreatorType": "self",                       "eDocCreatorPerspective": true,                       "companyLocation": "123456",                       "locations": {                           "establishment": {                               "activitySector": {                                   "type": "activityLine",                                   "code": "importer"                               },                               "taxesSettings": {                                   "icmsTaxPayer": true,                                   "enableCprb": false,                                   "usesInssCprbToGrossValue": false,                                   "pisCofinsIcmsTaxRelief": false                               },                               "taxRegime": "realProfit",                               "type": "business",                               "address": {                                   "zipcode": "04561-004",                                   "state": "SP",                                   "country": "BRA",                                   "cityCode": 3550308,                                   "countryCode": "0",                                   "cityName": "São Paulo"                               }                           },                           "entity": {                               "activitySector": {                                   "type": "activityLine",                                   "code": "finalConsumer"                               },                               "taxesSettings": {                                   "icmsTaxPayer": false,                                   "enableCprb": false,                                   "usesInssCprbToGrossValue": false,                                   "pisCofinsIcmsTaxRelief": false                               },                               "taxRegime": "individual",                               "address": {                                   "zipcode": "29024-047",                                   "state": "ES",                                   "country": "BRA",                                   "cityCode": 3205309,                                   "countryCode": "0",                                   "cityName": "Vitória"                               },                               "federalTaxId": ""                           }                       },                       "accountId": "",                       "subscriptionId": "",                       "additionalInfo": {                           "complementaryInfo": "Trib aprox R$ 2,71 Federal e R$ 2,44 Estadual Fonte: IBPT\nValor total do ICMS relativo ao Fundo de Combate à Pobreza (FCP) para a UF de destino: R$ 0,00\nValor total do ICMS de partilha para a UF do destinatário: R$ 1,76\nValor total do ICMS de partilha para a UF do remetente: R$ 0,00\nIPI com alíquota zero conforme: \"Decreto nº 8950/2016\"\nPIS/COFINS Lei nº 10.637/2002, Artigo 2º\nPIS/COFINS Lei nº 10.833/2003, Artigo 2º\nICMS/SP_Decreto nº 45.490/2000, Artigo 52, Parágrafo 2º, Item 1"                       }                    },                    "lines": [                       {                           "id": "000010",                           "lineCode": 1,                           "operationType": "standardSales",                           "lineAmount": 13.56,                           "useType": "use or consumption",                           "numberOfItems": 1,                           "otherCostAmount": 0,                           "freightAmount": 0,                           "insuranceAmount": 0,                           "lineTaxedDiscount": 0,                           "itemDescriptor": {                               "hsCode": "3917.21.00",                               "source": "1",                               "productType": "FOR PRODUCT",                               "unitIPIfactor": 1,                               "unitIcmsfactor": 1,                               "unitIcmsStfactor": 1,                               "unitPisCofinsfactor": 1,                               "comexTaxUnitFactor": 1                           },                           "overwrite": "no",                           "goods": {                               "subjectToIPIonInbound": false,                               "entityIcmsStSubstitute": "no"                           },                           "lineNetFigure": 10,                           "lineUnitPrice": 13.56,                           "taxDetails": [                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Informative",                                       "impactOnNetAmount": "Informative",                                       "accounting": "none"                                   },                                   "taxType": "aproxtribFed",                                   "citation": "Trib aprox R$ 2,71 Federal e R$ 2,44 Estadual Fonte: IBPT",                                   "subtotalTaxable": 13.56,                                   "rate": 19.99,                                   "tax": 2.71,                                   "exemptionCode": "",                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Informative",                                       "impactOnNetAmount": "Informative",                                       "accounting": "none"                                   },                                   "taxType": "aproxtribState",                                   "subtotalTaxable": 13.56,                                   "rate": 18,                                   "tax": 2.44,                                   "exemptionCode": ""                               },                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "liability"                                   },                                   "taxType": "cofins",                                   "citation": "PIS/COFINS Lei nº 10.833/2003, Artigo 2º",                                   "citationId": "727274fe-4d8d-43e5-946f-1a6fc4eeb6c7",                                   "subtotalTaxable": 13.56,                                   "rate": 7.6,                                   "tax": 1.03,                                   "exemptionCode": "",                                   "cst": "01",                                   "calcMode": "rate",                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "São Paulo",                                   "jurisdictionType": "State",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "liability"                                   },                                   "taxType": "icms",                                   "citation": "ICMS/SP_Decreto nº 45.490/2000, Artigo 52, Parágrafo 2º, Item 1",                                   "citationId": "23fd717c-8bac-460a-b893-f51e67d04ddf",                                   "subtotalTaxable": 13.56,                                   "rate": 4,                                   "tax": 0.54,                                   "exemptionCode": "",                                   "source": "1",                                   "cst": "00",                                   "modBC": "3",                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "Espírito Santo",                                   "jurisdictionType": "State",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "liability"                                   },                                   "taxType": "icmsDifaDest",                                   "citation": "Valor total do ICMS relativo ao Fundo de Combate à Pobreza (FCP) para a UF de destino: R$ 0,00\nValor total do ICMS de partilha para a UF do destinatário: R$ 1,76\nValor total do ICMS de partilha para a UF do remetente: R$ 0,00",                                   "subtotalTaxable": 13.56,                                   "rate": 17,                                   "tax": 1.76,                                   "exemptionCode": "",                                   "icmsInterPartRate": 100,                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "São Paulo",                                   "jurisdictionType": "State",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "liability"                                   },                                   "taxType": "icmsDifaRemet",                                   "citation": "Valor total do ICMS relativo ao Fundo de Combate à Pobreza (FCP) para a UF de destino: R$ 0,00\nValor total do ICMS de partilha para a UF do destinatário: R$ 1,76\nValor total do ICMS de partilha para a UF do remetente: R$ 0,00",                                   "subtotalTaxable": 13.56,                                   "rate": 4,                                   "tax": 0,                                   "exemptionCode": "",                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Add",                                       "impactOnNetAmount": "Add",                                       "accounting": "none"                                   },                                   "taxType": "ipi",                                   "citation": "IPI com alíquota zero conforme: \"Decreto nº 8950/2016\"",                                   "citationId": "285a78dd-7fba-4561-a15d-825d49ff69c7",                                   "subtotalTaxable": 13.56,                                   "rate": 0,                                   "tax": 0,                                   "exemptionCode": "",                                   "cst": "51",                                   "legalTaxClass": 999,                                   "calcMode": "rate",                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "liability"                                   },                                   "taxType": "pis",                                   "citation": "PIS/COFINS Lei nº 10.637/2002, Artigo 2º",                                   "citationId": "50be853e-bb04-441a-87dc-36a1b207c09c",                                   "subtotalTaxable": 13.56,                                   "rate": 1.65,                                   "tax": 0.22,                                   "exemptionCode": "",                                   "cst": "01",                                   "calcMode": "rate",                                   "isCustomCitation": false                               }                           ],                           "cfop": 6107,                           "lineNetUnitPrice": 10,                           "lineAdditionalInfo": ""                       }                    ],                    "version": "3",                    "processingInfo": {                       "versionId": "21.3.5-rc.1",                       "duration": "6.720"                    },                    "summary": {                       "numberOfLines": 1,                       "totalLineAmounts": 13.56,                       "totalTaxedDiscounts": 0,                       "totalUntaxedDiscounts": 0,                       "totalInsurances": 0,                       "totalFreights": 0,                       "totalOtherCosts": 0,                       "totalUnTaxedOtherCosts": 0,                       "totalInvoice": 13.56,                       "taxByType": {                           "aproxtribFed": {                               "tax": 2.71,                               "subtotalTaxable": 13.56,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 2.71                                   }                               ]                           },                           "aproxtribState": {                               "tax": 2.44,                               "subtotalTaxable": 13.56,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 2.44                                   }                               ]                           },                           "cofins": {                               "tax": 1.03,                               "subtotalTaxable": 13.56,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 1.03                                   }                               ]                           },                           "icms": {                               "tax": 0.54,                               "subtotalTaxable": 13.56,                               "jurisdictions": [                                   {                                       "jurisdictionName": "São Paulo",                                       "jurisdictionType": "State",                                       "tax": 0.54                                   }                               ]                           },                           "icmsDifaDest": {                               "tax": 1.76,                               "subtotalTaxable": 13.56,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Espírito Santo",                                       "jurisdictionType": "State",                                       "tax": 1.76                                   }                               ]                           },                           "icmsDifaRemet": {                               "tax": 0,                               "subtotalTaxable": 13.56,                               "jurisdictions": [                                   {                                       "jurisdictionName": "São Paulo",                                       "jurisdictionType": "State",                                       "tax": 0                                   }                               ]                           },                           "ipi": {                               "tax": 0,                               "subtotalTaxable": 13.56,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 0                                   }                               ]                           },                           "pis": {                               "tax": 0.22,                               "subtotalTaxable": 13.56,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 0.22                                   }                               ]                           }                       }                    },                    "input": {                       "header": {                           "transactionDate": "2021-03-21T10:26:36Z",                           "amountCalcType": "net",                           "documentCode": "Complementary1",                           "goods": {                               "model": "55",                               "idDest": 0,                               "tpEmis": "1"                           },                           "messageType": "goods",                           "eDocCreatorType": "self",                           "eDocCreatorPerspective": true,                           "companyLocation": "123456",                           "locations": {                               "establishment": {                                   "activitySector": {                                       "type": "activityLine",                                       "code": "importer"                                   },                                   "taxesSettings": {                                       "icmsTaxPayer": true,                                       "enableCprb": false,                                       "usesInssCprbToGrossValue": false,                                       "pisCofinsIcmsTaxRelief": false                                   },                                   "taxRegime": "realProfit",                                   "type": "business",                                   "address": {                                       "zipcode": "04561-004",                                       "state": "SP",                                       "country": "BRA",                                       "cityCode": 3550308,                                       "countryCode": "0",                                       "cityName": "São Paulo"                                   }                               },                               "entity": {                                   "activitySector": {                                       "type": "activityLine",                                       "code": "finalConsumer"                                   },                                   "taxesSettings": {                                       "icmsTaxPayer": false,                                       "enableCprb": false,                                       "usesInssCprbToGrossValue": false,                                       "pisCofinsIcmsTaxRelief": false                                   },                                   "taxRegime": "individual",                                   "address": {                                       "zipcode": "29024-047",                                       "state": "ES",                                       "country": "BRA",                                       "cityCode": 3205309,                                       "countryCode": "0",                                       "cityName": "Vitória"                                   },                                   "federalTaxId": ""                               }                           },                           "accountId": "",                           "subscriptionId": ""                       },                       "lines": [                           {                               "id": "000010",                               "lineCode": 1,                               "operationType": "standardSales",                               "lineAmount": 10,                               "useType": "use or consumption",                               "numberOfItems": 1,                               "otherCostAmount": 0,                               "freightAmount": 0,                               "insuranceAmount": 0,                               "lineTaxedDiscount": 0,                               "itemDescriptor": {                                   "hsCode": "3917.21.00",                                   "source": "1",                                   "productType": "FOR PRODUCT",                                   "unitIPIfactor": 1,                                   "unitIcmsfactor": 1,                                   "unitIcmsStfactor": 1,                                   "unitPisCofinsfactor": 1,                                   "comexTaxUnitFactor": 1                               },                               "overwrite": "no"                           }                       ],                       "version": "3"                    }                    } 
```

## Complementary sale invoice

State From

SP

State To

ES

hsCode

3917.21.00

### Payload request

[![Closed](https://avalara-devdocs-prod.mcoutput.com/goods-calculation-en/Skins/Default/Stylesheets/Images/transparent.gif)View example](javascript:void\(0\);)

```
 {                    "header":{                     "transactionDate":"2021-02-17T19:26:51Z",                     "amountCalcType":"net",                     "documentCode":"Complementary2",                     "invoicesRefs":[                        {                           "type":"documentCode",                           "documentCode":"Complementary1"                        }                     ],                     "goods":{                        "model":"55"                     },                     "messageType":"goods",                     "eDocCreatorType":"self",                     "eDocCreatorPerspective":true,                     "companyLocation":"123456789",                     "locations":{                        "establishment":{                           "activitySector":{                              "type":"activityLine",                              "code":"industry"                           },                           "taxesSettings":{                              "icmsTaxPayer":true,                              "pCredSN":0,                              "subjectToPayrollTaxRelief":true,                              "subjectWithholdingIss":true                           },                           "taxRegime":"realProfit",                           "entityType":"business",                           "stateTaxId":"",                           "type":"business",                           "address":{                              "zipcode":"04561-004",                              "state":"SP",                              "country":"BRA"                           },                           "federalTaxId":""                        },                        "entity":{                           "activitySector":{                              "type":"activityLine",                              "code":"finalConsumer"                           },                           "taxesSettings":{                              "icmsTaxPayer":false,                              "pCredSN":0,                              "subjectToPayrollTaxRelief":true,                              "subjectWithholdingIss":true                           },                           "taxRegime":"individual",                           "address":{                              "zipcode":"29024-047",                              "state":"ES",                              "country":"BRA"                           },                           "federalTaxId":""                        }                     }                    },                    "lines":[                     {                        "lineCode":"1",                        "operationType":"amountComplementary",                        "lineAmount":10.00,                        "useType":"use or consumption",                        "numberOfItems":0,                        "otherCostAmount":0.00,                        "freightAmount":0.00,                        "insuranceAmount":0.00,                        "lineTaxedDiscount":0.00,                        "itemDescriptor":{                           "hsCode":"3917.21.00",                           "source":"1",                           "productType":"FOR PRODUCT",                           "manufacturerEquivalent":false,                           "appropriateIPIcreditWhenInGoing":false,                           "appropriateICMScreditWhenInGoing":false,                           "usuallyAppropriatePISCOFINSCredit":false,                           "isPisCofinsEstimatedCredit":false,                           "piscofinsRevenueType":"01",                           "unitIPIfactor":1,                           "unitIcmsfactor":1,                           "unitIcmsStfactor":1,                           "unitPisCofinsfactor":1,                           "comexTaxUnitFactor":1                        },                        "customProperties":[                           {                              "goods":{                                 "subjectToIPIonInbound":false,                                 "returnedPercentageAmount":0                              }                           }                        ]                     }                    ]                    } 
```

### Payload response

[![Closed](https://avalara-devdocs-prod.mcoutput.com/goods-calculation-en/Skins/Default/Stylesheets/Images/transparent.gif)View example](javascript:void\(0\);)

```
 {                    "header": {                       "transactionDate": "2021-02-17T19:26:51Z",                       "amountCalcType": "net",                       "documentCode": "Complementary2",                       "invoicesRefs": [                           {                               "type": "documentCode",                               "documentCode": "Complementary1",                               "found": true                           }                       ],                       "goods": {                           "model": "55",                           "idDest": 0,                           "tpEmis": "1",                           "class": "NOTA FISCAL COMPLEMENTAR DE VALOR",                           "tpImp": "1"                       },                       "messageType": "goods",                       "eDocCreatorType": "self",                       "eDocCreatorPerspective": true,                       "companyLocation": "123456789",                       "locations": {                           "establishment": {                               "activitySector": {                                   "type": "activityLine",                                   "code": "industry"                               },                               "taxesSettings": {                                   "icmsTaxPayer": true,                                   "pCredSN": 0,                                   "subjectToPayrollTaxRelief": true,                                   "subjectWithholdingIss": true,                                   "enableCprb": false,                                   "usesInssCprbToGrossValue": false,                                   "pisCofinsIcmsTaxRelief": false                               },                               "taxRegime": "realProfit",                               "entityType": "business",                               "stateTaxId": "",                               "type": "business",                               "address": {                                   "zipcode": "04561-004",                                   "state": "SP",                                   "country": "BRA",                                   "cityCode": 3550308,                                   "countryCode": "0",                                   "cityName": "São Paulo"                               },                               "federalTaxId": ""                           },                           "entity": {                               "activitySector": {                                   "type": "activityLine",                                   "code": "finalConsumer"                               },                               "taxesSettings": {                                   "icmsTaxPayer": false,                                   "pCredSN": 0,                                   "subjectToPayrollTaxRelief": true,                                   "subjectWithholdingIss": true,                                   "enableCprb": false,                                   "usesInssCprbToGrossValue": false,                                   "pisCofinsIcmsTaxRelief": false                               },                               "taxRegime": "individual",                               "address": {                                   "zipcode": "29024-047",                                   "state": "ES",                                   "country": "BRA",                                   "cityCode": 3205309,                                   "countryCode": "0",                                   "cityName": "Vitória"                               },                               "federalTaxId": ""                           }                       },                       "accountId": "",                       "subscriptionId": "",                       "additionalInfo": {                           "complementaryInfo": "Valor total do ICMS relativo ao Fundo de Combate à Pobreza (FCP) para a UF de destino: R$ 0,00\nValor total do ICMS de partilha para a UF do destinatário: R$ 1,76\nValor total do ICMS de partilha para a UF do remetente: R$ 0,00\nIPI com alíquota zero conforme: \"Decreto nº 8950/2016\"\nPIS/COFINS Lei nº 10.637/2002, Artigo 2º\nPIS/COFINS Lei nº 10.833/2003, Artigo 2º\nICMS/SP_Decreto nº 45.490/2000, Artigo 52, Parágrafo 2º, Item 1"                       }                    },                    "lines": [                       {                           "lineCode": 1,                           "operationType": "amountComplementary",                           "lineAmount": 13.56,                           "useType": "use or consumption",                           "numberOfItems": 1,                           "otherCostAmount": 0,                           "freightAmount": 0,                           "insuranceAmount": 0,                           "lineTaxedDiscount": 0,                           "itemDescriptor": {                               "hsCode": "3917.21.00",                               "source": "1",                               "productType": "FOR PRODUCT",                               "manufacturerEquivalent": false,                               "appropriateIPIcreditWhenInGoing": false,                               "appropriateICMScreditWhenInGoing": false,                               "usuallyAppropriatePISCOFINSCredit": false,                               "isPisCofinsEstimatedCredit": false,                               "piscofinsRevenueType": "01",                               "unitIPIfactor": 1,                               "unitIcmsfactor": 1,                               "unitIcmsStfactor": 1,                               "unitPisCofinsfactor": 1,                               "comexTaxUnitFactor": 1                           },                           "customProperties": [                               {                                   "goods": {                                       "subjectToIPIonInbound": false,                                       "returnedPercentageAmount": 0                                   }                               }                           ],                           "overwrite": "amount",                           "goods": {                               "subjectToIPIonInbound": false,                               "entityIcmsStSubstitute": "no"                           },                           "lineNetFigure": 10,                           "lineUnitPrice": 13.56,                           "taxDetails": [                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "liability"                                   },                                   "taxType": "cofins",                                   "citation": "PIS/COFINS Lei nº 10.833/2003, Artigo 2º",                                   "citationId": "727274fe-4d8d-43e5-946f-1a6fc4eeb6c7",                                   "subtotalTaxable": 13.56,                                   "rate": 7.6,                                   "tax": 1.03,                                   "exemptionCode": "",                                   "cst": "01",                                   "calcMode": "rate",                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "São Paulo",                                   "jurisdictionType": "State",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "liability"                                   },                                   "taxType": "icms",                                   "citation": "ICMS/SP_Decreto nº 45.490/2000, Artigo 52, Parágrafo 2º, Item 1",                                   "citationId": "23fd717c-8bac-460a-b893-f51e67d04ddf",                                   "subtotalTaxable": 13.56,                                   "rate": 4,                                   "tax": 0.54,                                   "exemptionCode": "",                                   "source": "1",                                   "cst": "00",                                   "modBC": "3",                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "Espírito Santo",                                   "jurisdictionType": "State",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "liability"                                   },                                   "taxType": "icmsDifaDest",                                   "citation": "Valor total do ICMS relativo ao Fundo de Combate à Pobreza (FCP) para a UF de destino: R$ 0,00\nValor total do ICMS de partilha para a UF do destinatário: R$ 1,76\nValor total do ICMS de partilha para a UF do remetente: R$ 0,00",                                   "subtotalTaxable": 13.56,                                   "rate": 17,                                   "tax": 1.76,                                   "exemptionCode": "",                                   "icmsInterPartRate": 100,                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "São Paulo",                                   "jurisdictionType": "State",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "liability"                                   },                                   "taxType": "icmsDifaRemet",                                   "citation": "Valor total do ICMS relativo ao Fundo de Combate à Pobreza (FCP) para a UF de destino: R$ 0,00\nValor total do ICMS de partilha para a UF do destinatário: R$ 1,76\nValor total do ICMS de partilha para a UF do remetente: R$ 0,00",                                   "subtotalTaxable": 13.56,                                   "rate": 4,                                   "tax": 0,                                   "exemptionCode": "",                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Add",                                       "impactOnNetAmount": "Add",                                       "accounting": "none"                                   },                                   "taxType": "ipi",                                   "citation": "IPI com alíquota zero conforme: \"Decreto nº 8950/2016\"",                                   "citationId": "285a78dd-7fba-4561-a15d-825d49ff69c7",                                   "subtotalTaxable": 13.56,                                   "rate": 0,                                   "tax": 0,                                   "exemptionCode": "",                                   "cst": "51",                                   "legalTaxClass": 999,                                   "calcMode": "rate",                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "liability"                                   },                                   "taxType": "pis",                                   "citation": "PIS/COFINS Lei nº 10.637/2002, Artigo 2º",                                   "citationId": "50be853e-bb04-441a-87dc-36a1b207c09c",                                   "subtotalTaxable": 13.56,                                   "rate": 1.65,                                   "tax": 0.22,                                   "exemptionCode": "",                                   "cst": "01",                                   "calcMode": "rate",                                   "isCustomCitation": false                               }                           ],                           "cfop": 6107,                           "lineNetUnitPrice": 10,                           "lineAdditionalInfo": ""                       }                    ],                    "version": "3",                    "processingInfo": {                       "versionId": "21.3.5-rc.1",                       "duration": "5.691"                    },                    "summary": {                       "numberOfLines": 1,                       "totalLineAmounts": 13.56,                       "totalTaxedDiscounts": 0,                       "totalUntaxedDiscounts": 0,                       "totalInsurances": 0,                       "totalFreights": 0,                       "totalOtherCosts": 0,                       "totalUnTaxedOtherCosts": 0,                       "totalInvoice": 13.56,                       "taxByType": {                           "cofins": {                               "tax": 1.03,                               "subtotalTaxable": 13.56,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 1.03                                   }                               ]                           },                           "icms": {                               "tax": 0.54,                               "subtotalTaxable": 13.56,                               "jurisdictions": [                                   {                                       "jurisdictionName": "São Paulo",                                       "jurisdictionType": "State",                                       "tax": 0.54                                   }                               ]                           },                           "icmsDifaDest": {                               "tax": 1.76,                               "subtotalTaxable": 13.56,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Espírito Santo",                                       "jurisdictionType": "State",                                       "tax": 1.76                                   }                               ]                           },                           "icmsDifaRemet": {                               "tax": 0,                               "subtotalTaxable": 13.56,                               "jurisdictions": [                                   {                                       "jurisdictionName": "São Paulo",                                       "jurisdictionType": "State",                                       "tax": 0                                   }                               ]                           },                           "ipi": {                               "tax": 0,                               "subtotalTaxable": 13.56,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 0                                   }                               ]                           },                           "pis": {                               "tax": 0.22,                               "subtotalTaxable": 13.56,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 0.22                                   }                               ]                           }                       }                    },                    "input": {                       "header": {                           "transactionDate": "2021-02-17T19:26:51Z",                           "amountCalcType": "net",                           "documentCode": "Complementary2",                           "invoicesRefs": [                               {                                   "type": "documentCode",                                   "documentCode": "Complementary1",                                   "found": true                               }                           ],                           "goods": {                               "model": "55",                               "idDest": 0,                               "tpEmis": "1"                           },                           "messageType": "goods",                           "eDocCreatorType": "self",                           "eDocCreatorPerspective": true,                           "companyLocation": "123456789",                           "locations": {                               "establishment": {                                   "activitySector": {                                       "type": "activityLine",                                       "code": "industry"                                   },                                   "taxesSettings": {                                       "icmsTaxPayer": true,                                       "pCredSN": 0,                                       "subjectToPayrollTaxRelief": true,                                       "subjectWithholdingIss": true,                                       "enableCprb": false,                                       "usesInssCprbToGrossValue": false,                                       "pisCofinsIcmsTaxRelief": false                                   },                                   "taxRegime": "realProfit",                                   "entityType": "business",                                   "stateTaxId": "426.745.178",                                   "type": "business",                                   "address": {                                       "zipcode": "04561-004",                                       "state": "SP",                                       "country": "BRA",                                       "cityCode": 3550308,                                       "countryCode": "0",                                       "cityName": "São Paulo"                                   },                                   "federalTaxId": ""                               },                               "entity": {                                   "activitySector": {                                       "type": "activityLine",                                       "code": "finalConsumer"                                   },                                   "taxesSettings": {                                       "icmsTaxPayer": false,                                       "pCredSN": 0,                                       "subjectToPayrollTaxRelief": true,                                       "subjectWithholdingIss": true,                                       "enableCprb": false,                                       "usesInssCprbToGrossValue": false,                                       "pisCofinsIcmsTaxRelief": false                                   },                                   "taxRegime": "individual",                                   "address": {                                       "zipcode": "29024-047",                                       "state": "ES",                                       "country": "BRA",                                       "cityCode": 3205309,                                       "countryCode": "0",                                       "cityName": "Vitória"                                   },                                   "federalTaxId": "83695780000169"                               }                           },                           "accountId": "bdf71245-1288-4883-95a5-3a7530ea31af",                           "subscriptionId": "9fe9c37a-1da8-4b8e-9d1b-21207b21e9f9"                       },                       "lines": [                           {                               "lineCode": 1,                               "operationType": "amountComplementary",                               "lineAmount": 10,                               "useType": "use or consumption",                               "numberOfItems": 0,                               "otherCostAmount": 0,                               "freightAmount": 0,                               "insuranceAmount": 0,                               "lineTaxedDiscount": 0,                               "itemDescriptor": {                                   "hsCode": "3917.21.00",                                   "source": "1",                                   "productType": "FOR PRODUCT",                                   "manufacturerEquivalent": false,                                   "appropriateIPIcreditWhenInGoing": false,                                   "appropriateICMScreditWhenInGoing": false,                                   "usuallyAppropriatePISCOFINSCredit": false,                                   "isPisCofinsEstimatedCredit": false,                                   "piscofinsRevenueType": "01",                                   "unitIPIfactor": 1,                                   "unitIcmsfactor": 1,                                   "unitIcmsStfactor": 1,                                   "unitPisCofinsfactor": 1,                                   "comexTaxUnitFactor": 1                               },                               "customProperties": [                                   {                                       "goods": {                                           "subjectToIPIonInbound": false,                                           "returnedPercentageAmount": 0                                       }                                   }                               ],                               "overwrite": "no",                               "referencedItem": {                                   "documentCode": "Complementary1",                                   "lineCode": 1                               }                           }                       ],                       "version": "3"                    }                    } 
```

**Advice:** For the "Complementary Value Electronic Invoice" scenario to work properly, it is necessary to refer, in an appropriate manner, to the original invoice.

## Sale within the state to non-ICMS taxpayer (final consumer)

State From

SP

State To

SP

hsCode

4901.10.00

### Payload request

[![Closed](https://avalara-devdocs-prod.mcoutput.com/goods-calculation-en/Skins/Default/Stylesheets/Images/transparent.gif)View example](javascript:void\(0\);)

```
{                    "header":                    {                    "transactionDate":"2021-02-21T10:31:01Z",                    "amountCalcType":"gross",                    "documentCode":"0050569BC86C1EDB9D8B399F63C7D08D",                    "goods":                    {                    "model":"55"                    },                    "messageType":"goods",                    "eDocCreatorType":"self",                    "eDocCreatorPerspective":true,                    "companyLocation":"12345678",                    "locations":                    {                    "establishment":                    {                    "activitySector":                    {                    "type":"activityLine",                    "code":"importer"                    },                    "taxesSettings":                    {                    "icmsTaxPayer":true,                    "pCredSN":0,                    "subjectToPayrollTaxRelief":true,                    "subjectWithholdingIss":true                    },                    "taxRegime":"realProfit",                    "entityType":"business",                    "stateTaxId":"99999999",                    "type":"business",                    "address":                    {                    "zipcode":"04561-004",                    "state":"SP",                    "country":"BRA"                    },                    "federalTaxId":"999999999"                    },                    "entity":                    {                    "activitySector":                    {                    "type":"activityLine",                    "code":"finalConsumer"                    },                    "taxesSettings":                    {                    "icmsTaxPayer":false,                    "pCredSN":0,                    "subjectToPayrollTaxRelief":true,                    "subjectWithholdingIss":true                    },                    "taxRegime":"individual",                    "address":                    {                    "zipcode":"04710010",                    "state":"SP",                    "country":"BRA"                    },                    "federalTaxId":""                    }                    }                    },                    "lines":                    [                    {                    "id":"000010",                    "lineCode":"1",                    "operationType":"standardSales",                    "lineAmount":0,                    "lineUnitPrice": 100,                    "useType":"use or consumption",                    "numberOfItems":10,                    "otherCostAmount":0.00,                    "freightAmount":0.00,                    "insuranceAmount":0.00,                    "lineTaxedDiscount":0.00,                    "itemDescriptor":                    {                    "taxCode":"",                    "hsCode":"4901.10.00",                    "source":"0",                    "productType":"FOR PRODUCT",                    "manufacturerEquivalent":false,                    "appropriateIPIcreditWhenInGoing":false,                    "appropriateICMScreditWhenInGoing":false,                    "usuallyAppropriatePISCOFINSCredit":false,                    "isPisCofinsEstimatedCredit":false,                    "piscofinsRevenueType":"01",                    "unitIPIfactor":1,                    "unitIcmsfactor":1,                    "unitIcmsStfactor":1,                    "unitPisCofinsfactor":1,                    "comexTaxUnitFactor":1                    },                    "customProperties":                    [                    {                    "goods":                    {                     "subjectToIPIonInbound":false,                     "returnedPercentageAmount":0                    }                    }                    ]                    }                    ]                    } 
```

### Payload response

[![Closed](https://avalara-devdocs-prod.mcoutput.com/goods-calculation-en/Skins/Default/Stylesheets/Images/transparent.gif)View example](javascript:void\(0\);)

```
 {                    "header": {                       "transactionDate": "2021-02-21T10:31:01Z",                       "amountCalcType": "gross",                       "documentCode": "0050569BC86C1EDB9D8B399F63C7D08D",                       "goods": {                           "model": "55",                           "idDest": 0,                           "tpEmis": "1",                           "class": "VENDA DE PRODUÇÃO DO ESTABELECIMENTO",                           "tpImp": "1"                       },                       "messageType": "goods",                       "eDocCreatorType": "self",                       "eDocCreatorPerspective": true,                       "companyLocation": "12345678",                       "locations": {                           "establishment": {                               "activitySector": {                                   "type": "activityLine",                                   "code": "importer"                               },                               "taxesSettings": {                                   "icmsTaxPayer": true,                                   "pCredSN": 0,                                   "subjectToPayrollTaxRelief": true,                                   "subjectWithholdingIss": true,                                   "enableCprb": false,                                   "usesInssCprbToGrossValue": false,                                   "pisCofinsIcmsTaxRelief": false                               },                               "taxRegime": "realProfit",                               "entityType": "business",                               "stateTaxId": "99999999",                               "type": "business",                               "address": {                                   "zipcode": "04561-004",                                   "state": "SP",                                   "country": "BRA",                                   "cityCode": 3550308,                                   "countryCode": "0",                                   "cityName": "São Paulo"                               },                               "federalTaxId": "999999999"                           },                           "entity": {                               "activitySector": {                                   "type": "activityLine",                                   "code": "finalConsumer"                               },                               "taxesSettings": {                                   "icmsTaxPayer": false,                                   "pCredSN": 0,                                   "subjectToPayrollTaxRelief": true,                                   "subjectWithholdingIss": true,                                   "enableCprb": false,                                   "usesInssCprbToGrossValue": false,                                   "pisCofinsIcmsTaxRelief": false                               },                               "taxRegime": "individual",                               "address": {                                   "zipcode": "04710010",                                   "state": "SP",                                   "country": "BRA",                                   "cityCode": 3550308,                                   "countryCode": "0",                                   "cityName": "São Paulo"                               },                               "federalTaxId": ""                           }                       },                       "accountId": "",                       "subscriptionId": "",                       "additionalInfo": {                           "complementaryInfo": "Trib aprox R$ 42,00 Federal e R$ 180,00 Estadual Fonte: IBPT\nIPI não tributado conforme: \"Decreto nº 8.950/2016\"\nPIS/COFINS com alíquota zero conforme: \"Lei nº 10.865/2004, Artigo 28, Inciso VI, incluído pela Lei nº 11.033/2004\"\nICMS/SP_Decreto nº 45.490/2000, Artigo 52, Inciso I"                       }                    },                    "lines": [                       {                           "id": "000010",                           "lineCode": 1,                           "operationType": "standardSales",                           "lineAmount": 1000,                           "lineUnitPrice": 100,                           "useType": "use or consumption",                           "numberOfItems": 10,                           "otherCostAmount": 0,                           "freightAmount": 0,                           "insuranceAmount": 0,                           "lineTaxedDiscount": 0,                           "itemDescriptor": {                               "taxCode": "",                               "hsCode": "4901.10.00",                               "source": "0",                               "productType": "FOR PRODUCT",                               "manufacturerEquivalent": false,                               "appropriateIPIcreditWhenInGoing": false,                               "appropriateICMScreditWhenInGoing": false,                               "usuallyAppropriatePISCOFINSCredit": false,                               "isPisCofinsEstimatedCredit": false,                               "piscofinsRevenueType": "01",                               "unitIPIfactor": 1,                               "unitIcmsfactor": 1,                               "unitIcmsStfactor": 1,                               "unitPisCofinsfactor": 1,                               "comexTaxUnitFactor": 1                           },                           "customProperties": [                               {                                   "goods": {                                       "subjectToIPIonInbound": false,                                       "returnedPercentageAmount": 0                                   }                               }                           ],                           "overwrite": "no",                           "warnings": [                               {                                   "id": "83714234-6adb-4997-84be-2cc8f9ec5e87",                                   "code": "WC003",                                   "citation": "Subject to PIS Benefits: \"PIS_Constituição Federal de 1988, Artigo 150, Inciso VI, Alínea d\"",                                   "description": "Sem prejuízo de outras garantias asseguradas ao contribuinte, é vedado à União, aos Estados, ao Distrito Federal e aos Municípios instituir impostos sobre livros, jornais, periódicos e o papel destinado a sua impressão",                                   "isCustomCitation": false                               },                               {                                   "id": "c0291665-0cfe-4dfc-9795-f85bf67ea9d3",                                   "code": "WC003",                                   "citation": "Subject to COFINS Benefits: \"COFINS_Constituição Federal de 1988, Artigo 150, Inciso VI, Alínea d\"",                                   "description": "Sem prejuízo de outras garantias asseguradas ao contribuinte, é vedado à União, aos Estados, ao Distrito Federal e aos Municípios instituir impostos sobre livros, jornais, periódicos e o papel destinado a sua impressão",                                   "isCustomCitation": false                               },                               {                                   "id": "9f7a7ecc-cc43-43e3-be1c-b0b26bea8d47",                                   "code": "WC001",                                   "citation": "Subject to ICMS Benefits: \"ICMS/SP_Decreto nº 45.490/2000, Artigo 7º, Inciso XIII\"",                                   "description": "Para aplicação do citado benefício fiscal é necessário observar as condições determinadas pelo artigo 7º, § 6º do RICMS/SP",                                   "isCustomCitation": false                               }                           ],                           "goods": {                               "subjectToIPIonInbound": false,                               "entityIcmsStSubstitute": "no"                           },                           "taxDetails": [                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Informative",                                       "impactOnNetAmount": "Informative",                                       "accounting": "none"                                   },                                   "taxType": "aproxtribFed",                                   "citation": "Trib aprox R$ 42,00 Federal e R$ 180,00 Estadual Fonte: IBPT",                                   "subtotalTaxable": 1000,                                   "rate": 4.2,                                   "tax": 42,                                   "exemptionCode": "",                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Informative",                                       "impactOnNetAmount": "Informative",                                       "accounting": "none"                                   },                                   "taxType": "aproxtribState",                                   "subtotalTaxable": 1000,                                   "rate": 18,                                   "tax": 180,                                   "exemptionCode": ""                               },                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "none"                                   },                                   "taxType": "cofins",                                   "citation": "PIS/COFINS com alíquota zero conforme: \"Lei nº 10.865/2004, Artigo 28, Inciso VI, incluído pela Lei nº 11.033/2004\"",                                   "citationId": "1f0f4a6e-4e31-41b5-9d6a-14f36bf00b34",                                   "subtotalTaxable": 1000,                                   "rate": 0,                                   "tax": 0,                                   "exemptionCode": "",                                   "cst": "06",                                   "calcMode": "rate",                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "São Paulo",                                   "jurisdictionType": "State",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "liability"                                   },                                   "taxType": "icms",                                   "citation": "ICMS/SP_Decreto nº 45.490/2000, Artigo 52, Inciso I",                                   "citationId": "5266e193-11d2-46f1-b346-27e30cc49bcb",                                   "subtotalTaxable": 1000,                                   "rate": 18,                                   "tax": 180,                                   "exemptionCode": "",                                   "source": "0",                                   "cst": "00",                                   "modBC": "3",                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Informative",                                       "impactOnNetAmount": "Informative",                                       "accounting": "none"                                   },                                   "taxType": "ipi",                                   "citation": "IPI não tributado conforme: \"Decreto nº 8.950/2016\"",                                   "citationId": "7e086799-cb88-499f-bd53-7a10cb02442b",                                   "subtotalTaxable": 1000,                                   "rate": 0,                                   "tax": 0,                                   "exemptionCode": "",                                   "cst": "53",                                   "legalTaxClass": 999,                                   "calcMode": "rate",                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "none"                                   },                                   "taxType": "pis",                                   "citation": "PIS/COFINS com alíquota zero conforme: \"Lei nº 10.865/2004, Artigo 28, Inciso VI, incluído pela Lei nº 11.033/2004\"",                                   "citationId": "85119944-8343-471d-b952-d49f77cb4277",                                   "subtotalTaxable": 1000,                                   "rate": 0,                                   "tax": 0,                                   "exemptionCode": "",                                   "cst": "06",                                   "calcMode": "rate",                                   "isCustomCitation": false                               }                           ],                           "cfop": 5101,                           "lineAdditionalInfo": "",                           "lineNetFigure": 820                       }                    ],                    "version": "3",                    "processingInfo": {                       "versionId": "21.3.5-rc.1",                       "duration": "6.700"                    },                    "summary": {                       "numberOfLines": 1,                       "totalLineAmounts": 1000,                       "totalTaxedDiscounts": 0,                       "totalUntaxedDiscounts": 0,                       "totalInsurances": 0,                       "totalFreights": 0,                       "totalOtherCosts": 0,                       "totalUnTaxedOtherCosts": 0,                       "totalInvoice": 1000,                       "taxByType": {                           "aproxtribFed": {                               "tax": 42,                               "subtotalTaxable": 1000,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 42                                   }                               ]                           },                           "aproxtribState": {                               "tax": 180,                               "subtotalTaxable": 1000,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 180                                   }                               ]                           },                           "cofins": {                               "tax": 0,                               "subtotalTaxable": 1000,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 0                                   }                               ]                           },                           "icms": {                               "tax": 180,                               "subtotalTaxable": 1000,                               "jurisdictions": [                                   {                                       "jurisdictionName": "São Paulo",                                       "jurisdictionType": "State",                                       "tax": 180                                   }                               ]                           },                           "ipi": {                               "tax": 0,                               "subtotalTaxable": 1000,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 0                                   }                               ]                           },                           "pis": {                               "tax": 0,                               "subtotalTaxable": 1000,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 0                                   }                               ]                           }                       }                    },                    "input": {                       "header": {                           "transactionDate": "2021-02-21T10:31:01Z",                           "amountCalcType": "gross",                           "documentCode": "0050569BC86C1EDB9D8B399F63C7D08D",                           "goods": {                               "model": "55",                               "idDest": 0,                               "tpEmis": "1"                           },                           "messageType": "goods",                           "eDocCreatorType": "self",                           "eDocCreatorPerspective": true,                           "companyLocation": "12345678",                           "locations": {                               "establishment": {                                   "activitySector": {                                       "type": "activityLine",                                       "code": "importer"                                   },                                   "taxesSettings": {                                       "icmsTaxPayer": true,                                       "pCredSN": 0,                                       "subjectToPayrollTaxRelief": true,                                       "subjectWithholdingIss": true,                                       "enableCprb": false,                                       "usesInssCprbToGrossValue": false,                                       "pisCofinsIcmsTaxRelief": false                                   },                                   "taxRegime": "realProfit",                                   "entityType": "business",                                   "stateTaxId": "99999999",                                   "type": "business",                                   "address": {                                       "zipcode": "04561-004",                                       "state": "SP",                                       "country": "BRA",                                       "cityCode": 3550308,                                       "countryCode": "0",                                       "cityName": "São Paulo"                                   },                                   "federalTaxId": "999999999"                               },                               "entity": {                                   "activitySector": {                                       "type": "activityLine",                                       "code": "finalConsumer"                                   },                                   "taxesSettings": {                                       "icmsTaxPayer": false,                                       "pCredSN": 0,                                       "subjectToPayrollTaxRelief": true,                                       "subjectWithholdingIss": true,                                       "enableCprb": false,                                       "usesInssCprbToGrossValue": false,                                       "pisCofinsIcmsTaxRelief": false                                   },                                   "taxRegime": "individual",                                   "address": {                                       "zipcode": "04710010",                                       "state": "SP",                                       "country": "BRA",                                       "cityCode": 3550308,                                       "countryCode": "0",                                       "cityName": "São Paulo"                                   },                                   "federalTaxId": ""                               }                           },                           "accountId": "",                           "subscriptionId": ""                       },                       "lines": [                           {                               "id": "000010",                               "lineCode": 1,                               "operationType": "standardSales",                               "lineAmount": 0,                               "lineUnitPrice": 100,                               "useType": "use or consumption",                               "numberOfItems": 10,                               "otherCostAmount": 0,                               "freightAmount": 0,                               "insuranceAmount": 0,                               "lineTaxedDiscount": 0,                               "itemDescriptor": {                                   "taxCode": "",                                   "hsCode": "4901.10.00",                                   "source": "0",                                   "productType": "FOR PRODUCT",                                   "manufacturerEquivalent": false,                                   "appropriateIPIcreditWhenInGoing": false,                                   "appropriateICMScreditWhenInGoing": false,                                   "usuallyAppropriatePISCOFINSCredit": false,                                   "isPisCofinsEstimatedCredit": false,                                   "piscofinsRevenueType": "01",                                   "unitIPIfactor": 1,                                   "unitIcmsfactor": 1,                                   "unitIcmsStfactor": 1,                                   "unitPisCofinsfactor": 1,                                   "comexTaxUnitFactor": 1                               },                               "customProperties": [                                   {                                       "goods": {                                           "subjectToIPIonInbound": false,                                           "returnedPercentageAmount": 0                                       }                                   }                               ],                               "overwrite": "no",                               "warnings": [                                   {                                       "id": "83714234-6adb-4997-84be-2cc8f9ec5e87",                                       "code": "WC003",                                       "citation": "Subject to PIS Benefits: \"PIS_Constituição Federal de 1988, Artigo 150, Inciso VI, Alínea d\"",                                       "description": "Sem prejuízo de outras garantias asseguradas ao contribuinte, é vedado à União, aos Estados, ao Distrito Federal e aos Municípios instituir impostos sobre livros, jornais, periódicos e o papel destinado a sua impressão",                                       "isCustomCitation": false                                   },                                   {                                       "id": "c0291665-0cfe-4dfc-9795-f85bf67ea9d3",                                       "code": "WC003",                                       "citation": "Subject to COFINS Benefits: \"COFINS_Constituição Federal de 1988, Artigo 150, Inciso VI, Alínea d\"",                                       "description": "Sem prejuízo de outras garantias asseguradas ao contribuinte, é vedado à União, aos Estados, ao Distrito Federal e aos Municípios instituir impostos sobre livros, jornais, periódicos e o papel destinado a sua impressão",                                       "isCustomCitation": false                                   },                                   {                                       "id": "9f7a7ecc-cc43-43e3-be1c-b0b26bea8d47",                                       "code": "WC001",                                       "citation": "Subject to ICMS Benefits: \"ICMS/SP_Decreto nº 45.490/2000, Artigo 7º, Inciso XIII\"",                                       "description": "Para aplicação do citado benefício fiscal é necessário observar as condições determinadas pelo artigo 7º, § 6º do RICMS/SP",                                       "isCustomCitation": false                                   }                               ]                           }                       ],                       "version": "3"                    }                    } 
```

## Total outbound goods return

State From

SP

State To

SP

hsCode

4901.10.00

### Payload request

[![Closed](https://avalara-devdocs-prod.mcoutput.com/goods-calculation-en/Skins/Default/Stylesheets/Images/transparent.gif)View example](javascript:void\(0\);)

```
 {                    "header":                    {                    "transactionDate":"2021-02-21T10:31:01Z",                    "amountCalcType":"gross",                    "documentCode":"TotalReturn",                    "invoicesRefs":                    [                    {                    "type":"documentCode",                    "documentCode":"0050569BC86C1EDB9D8B399F63C7D08D"                    }                    ],                    "goods":                    {                    "model":"55"                    },                    "messageType":"goods",                    "eDocCreatorType":"self",                    "eDocCreatorPerspective":true,                    "companyLocation":"12345678",                    "locations":                    {                    "establishment":                    {                    "activitySector":                    {                    "type":"activityLine",                    "code":"importer"                    },                    "taxesSettings":                    {                    "icmsTaxPayer":true,                    "pCredSN":0,                    "subjectToPayrollTaxRelief":true,                    "subjectWithholdingIss":true                    },                    "taxRegime":"realProfit",                    "entityType":"business",                    "stateTaxId":"9999999",                    "type":"business",                    "address":                    {                    "zipcode":"04561-004",                    "state":"SP",                    "country":"BRA"                    },                    "federalTaxId":"9999999"                    },                    "entity":                    {                    "activitySector":                    {                    "type":"activityLine",                    "code":"finalConsumer"                    },                    "taxesSettings":                    {                    "icmsTaxPayer":false,                    "pCredSN":0,                    "subjectToPayrollTaxRelief":true,                    "subjectWithholdingIss":true                    },                    "taxRegime":"individual",                    "address":                    {                    "zipcode":"04710010",                    "state":"SP",                    "country":"BRA"                    },                    "federalTaxId":""                    }                    }                    },                    "lines":                    [                    {                    "id":"000010",                    "lineCode":"1",                    "operationType":"salesReturn",                    "lineAmount":0,                    "lineUnitPrice": 100,                    "useType":"use or consumption",                    "numberOfItems":10,                    "otherCostAmount":0.00,                    "freightAmount":0.00,                    "insuranceAmount":0.00,                    "lineTaxedDiscount":0.00,                    "itemDescriptor":                    {                    "taxCode":"",                    "hsCode":"4901.10.00",                    "source":"0",                    "productType":"FOR PRODUCT",                    "manufacturerEquivalent":false,                    "appropriateIPIcreditWhenInGoing":false,                    "appropriateICMScreditWhenInGoing":false,                    "usuallyAppropriatePISCOFINSCredit":false,                    "isPisCofinsEstimatedCredit":false,                    "piscofinsRevenueType":"01",                    "unitIPIfactor":1,                    "unitIcmsfactor":1,                    "unitIcmsStfactor":1,                    "unitPisCofinsfactor":1,                    "comexTaxUnitFactor":1                    },                    "customProperties":                    [                    {                    "goods":                    {                     "subjectToIPIonInbound":false,                     "returnedPercentageAmount":0                    }                    }                    ]                    }                    ]                    } 
```

### Payload response

[![Closed](https://avalara-devdocs-prod.mcoutput.com/goods-calculation-en/Skins/Default/Stylesheets/Images/transparent.gif)View example](javascript:void\(0\);)

```
 {                    "header": {                       "transactionDate": "2021-02-21T10:31:01Z",                       "amountCalcType": "gross",                       "documentCode": "TotalReturn",                       "invoicesRefs": [                           {                               "type": "documentCode",                               "documentCode": "0050569BC86C1EDB9D8B399F63C7D08D",                               "found": true                           }                       ],                       "goods": {                           "model": "55",                           "idDest": 1,                           "tpEmis": "1",                           "class": "DEVOLUÇÃO DE VENDA",                           "tpImp": "1"                       },                       "messageType": "goods",                       "eDocCreatorType": "self",                       "eDocCreatorPerspective": true,                       "companyLocation": "12345678",                       "locations": {                           "establishment": {                               "activitySector": {                                   "type": "activityLine",                                   "code": "importer"                               },                               "taxesSettings": {                                   "icmsTaxPayer": true,                                   "pCredSN": 0,                                   "subjectToPayrollTaxRelief": true,                                   "subjectWithholdingIss": true,                                   "enableCprb": false,                                   "usesInssCprbToGrossValue": false,                                   "pisCofinsIcmsTaxRelief": false                               },                               "taxRegime": "realProfit",                               "entityType": "business",                               "stateTaxId": "99999999",                               "type": "business",                               "address": {                                   "zipcode": "04561-004",                                   "state": "SP",                                   "country": "BRA",                                   "cityCode": 3550308,                                   "countryCode": "0",                                   "cityName": "São Paulo"                               },                               "federalTaxId": "99999999"                           },                           "entity": {                               "activitySector": {                                   "type": "activityLine",                                   "code": "finalConsumer"                               },                               "taxesSettings": {                                   "icmsTaxPayer": false,                                   "pCredSN": 0,                                   "subjectToPayrollTaxRelief": true,                                   "subjectWithholdingIss": true,                                   "enableCprb": false,                                   "usesInssCprbToGrossValue": false,                                   "pisCofinsIcmsTaxRelief": false                               },                               "taxRegime": "individual",                               "address": {                                   "zipcode": "04710010",                                   "state": "SP",                                   "country": "BRA",                                   "cityCode": 3550308,                                   "countryCode": "0",                                   "cityName": "São Paulo"                               },                               "federalTaxId": ""                           }                       },                       "accountId": "",                       "subscriptionId": "",                       "additionalInfo": {                           "complementaryInfo": "Base de calculo de IPI R$: 1.000,00\nValor IPI R$: 0,00"                       }                    },                    "lines": [                       {                           "id": "000010",                           "lineCode": 1,                           "operationType": "salesReturn",                           "lineAmount": 1000,                           "lineUnitPrice": 100,                           "useType": "use or consumption",                           "numberOfItems": 10,                           "otherCostAmount": 0,                           "freightAmount": 0,                           "insuranceAmount": 0,                           "lineTaxedDiscount": 0,                           "itemDescriptor": {                               "taxCode": "",                               "hsCode": "4901.10.00",                               "source": "0",                               "productType": "FOR PRODUCT",                               "manufacturerEquivalent": false,                               "appropriateIPIcreditWhenInGoing": false,                               "appropriateICMScreditWhenInGoing": false,                               "usuallyAppropriatePISCOFINSCredit": false,                               "isPisCofinsEstimatedCredit": false,                               "piscofinsRevenueType": "01",                               "unitIPIfactor": 1,                               "unitIcmsfactor": 1,                               "unitIcmsStfactor": 1,                               "unitPisCofinsfactor": 1,                               "comexTaxUnitFactor": 1                           },                           "customProperties": [                               {                                   "goods": {                                       "subjectToIPIonInbound": false,                                       "returnedPercentageAmount": 0                                   }                               }                           ],                           "overwrite": "proportional",                           "referencedItem": {                               "documentCode": "0050569BC86C1EDB9D8B399F63C7D08D",                               "lineCode": 1                           },                           "goods": {                               "subjectToIPIonInbound": false,                               "entityIcmsStSubstitute": "no"                           },                           "taxDetails": [                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Informative",                                       "impactOnNetAmount": "Informative",                                       "accounting": "none"                                   },                                   "taxType": "aproxtribFed",                                   "citation": "Trib aprox R$ 42,00 Federal e R$ 180,00 Estadual Fonte: IBPT",                                   "subtotalTaxable": 1000,                                   "rate": 4.2,                                   "tax": 42,                                   "exemptionCode": ""                               },                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Informative",                                       "impactOnNetAmount": "Informative",                                       "accounting": "none"                                   },                                   "taxType": "aproxtribState",                                   "citation": null,                                   "subtotalTaxable": 1000,                                   "rate": 18,                                   "tax": 180,                                   "exemptionCode": ""                               },                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "none"                                   },                                   "taxType": "cofins",                                   "citation": "PIS/COFINS com alíquota zero conforme: \"Lei nº 10.865/2004, Artigo 28, Inciso VI, incluído pela Lei nº 11.033/2004\"",                                   "subtotalTaxable": 1000,                                   "rate": 0,                                   "tax": 0,                                   "exemptionCode": "",                                   "cst": "98",                                   "pRedBC": null,                                   "calcMode": "rate"                               },                               {                                   "jurisdictionName": "São Paulo",                                   "jurisdictionType": "State",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "asset"                                   },                                   "taxType": "icms",                                   "citation": "ICMS/SP_Decreto nº 45.490/2000, Artigo 52, Inciso I",                                   "subtotalTaxable": 1000,                                   "rate": 18,                                   "tax": 180,                                   "exemptionCode": "",                                   "source": "0",                                   "cst": "00",                                   "modBC": "3"                               },                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Add",                                       "impactOnNetAmount": "Add",                                       "accounting": "none"                                   },                                   "taxType": "ipiReturned",                                   "citation": "Base de calculo de IPI R$: 1.000,00\nValor IPI R$: 0,00",                                   "subtotalTaxable": 1000,                                   "rate": 0,                                   "tax": 0,                                   "exemptionCode": "",                                   "cst": "03",                                   "legalTaxClass": 999,                                   "calcMode": "rate",                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "none"                                   },                                   "taxType": "pis",                                   "citation": "PIS/COFINS com alíquota zero conforme: \"Lei nº 10.865/2004, Artigo 28, Inciso VI, incluído pela Lei nº 11.033/2004\"",                                   "subtotalTaxable": 1000,                                   "rate": 0,                                   "tax": 0,                                   "exemptionCode": "",                                   "cst": "98",                                   "pRedBC": null,                                   "calcMode": "rate"                               }                           ],                           "cfop": 1201,                           "lineAdditionalInfo": "",                           "lineNetFigure": 820                       }                    ],                    "version": "3",                    "processingInfo": {                       "versionId": "21.3.5-rc.1",                       "duration": "5.249"                    },                    "summary": {                       "numberOfLines": 1,                       "totalLineAmounts": 1000,                       "totalTaxedDiscounts": 0,                       "totalUntaxedDiscounts": 0,                       "totalInsurances": 0,                       "totalFreights": 0,                       "totalOtherCosts": 0,                       "totalUnTaxedOtherCosts": 0,                       "totalInvoice": 1000,                       "taxByType": {                           "aproxtribFed": {                               "tax": 42,                               "subtotalTaxable": 1000,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 42                                   }                               ]                           },                           "aproxtribState": {                               "tax": 180,                               "subtotalTaxable": 1000,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 180                                   }                               ]                           },                           "cofins": {                               "tax": 0,                               "subtotalTaxable": 1000,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 0                                   }                               ]                           },                           "icms": {                               "tax": 180,                               "subtotalTaxable": 1000,                               "jurisdictions": [                                   {                                       "jurisdictionName": "São Paulo",                                       "jurisdictionType": "State",                                       "tax": 180                                   }                               ]                           },                           "ipiReturned": {                               "tax": 0,                               "subtotalTaxable": 1000,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 0                                   }                               ]                           },                           "pis": {                               "tax": 0,                               "subtotalTaxable": 1000,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 0                                   }                               ]                           }                       }                    },                    "input": {                       "header": {                           "transactionDate": "2021-02-21T10:31:01Z",                           "amountCalcType": "gross",                           "documentCode": "TotalReturn",                           "invoicesRefs": [                               {                                   "type": "documentCode",                                   "documentCode": "0050569BC86C1EDB9D8B399F63C7D08D",                                   "found": true                               }                           ],                           "goods": {                               "model": "55",                               "idDest": 0,                               "tpEmis": "1"                           },                           "messageType": "goods",                           "eDocCreatorType": "self",                           "eDocCreatorPerspective": true,                           "companyLocation": "",                           "locations": {                               "establishment": {                                   "activitySector": {                                       "type": "activityLine",                                       "code": "importer"                                   },                                   "taxesSettings": {                                       "icmsTaxPayer": true,                                       "pCredSN": 0,                                       "subjectToPayrollTaxRelief": true,                                       "subjectWithholdingIss": true,                                       "enableCprb": false,                                       "usesInssCprbToGrossValue": false,                                       "pisCofinsIcmsTaxRelief": false                                   },                                   "taxRegime": "realProfit",                                   "entityType": "business",                                   "stateTaxId": "9999999",                                   "type": "business",                                   "address": {                                       "zipcode": "04561-004",                                       "state": "SP",                                       "country": "BRA",                                       "cityCode": 3550308,                                       "countryCode": "0",                                       "cityName": "São Paulo"                                   },                                   "federalTaxId": "999999999"                               },                               "entity": {                                   "activitySector": {                                       "type": "activityLine",                                       "code": "finalConsumer"                                   },                                   "taxesSettings": {                                       "icmsTaxPayer": false,                                       "pCredSN": 0,                                       "subjectToPayrollTaxRelief": true,                                       "subjectWithholdingIss": true,                                       "enableCprb": false,                                       "usesInssCprbToGrossValue": false,                                       "pisCofinsIcmsTaxRelief": false                                   },                                   "taxRegime": "individual",                                   "address": {                                       "zipcode": "04710010",                                       "state": "SP",                                       "country": "BRA",                                       "cityCode": 3550308,                                       "countryCode": "0",                                       "cityName": "São Paulo"                                   },                                   "federalTaxId": ""                               }                           },                           "accountId": "",                           "subscriptionId": ""                       },                       "lines": [                           {                               "id": "000010",                               "lineCode": 1,                               "operationType": "salesReturn",                               "lineAmount": 0,                               "lineUnitPrice": 100,                               "useType": "use or consumption",                               "numberOfItems": 10,                               "otherCostAmount": 0,                               "freightAmount": 0,                               "insuranceAmount": 0,                               "lineTaxedDiscount": 0,                               "itemDescriptor": {                                   "taxCode": "",                                   "hsCode": "4901.10.00",                                   "source": "0",                                   "productType": "FOR PRODUCT",                                   "manufacturerEquivalent": false,                                   "appropriateIPIcreditWhenInGoing": false,                                   "appropriateICMScreditWhenInGoing": false,                                   "usuallyAppropriatePISCOFINSCredit": false,                                   "isPisCofinsEstimatedCredit": false,                                   "piscofinsRevenueType": "01",                                   "unitIPIfactor": 1,                                   "unitIcmsfactor": 1,                                   "unitIcmsStfactor": 1,                                   "unitPisCofinsfactor": 1,                                   "comexTaxUnitFactor": 1                               },                               "customProperties": [                                   {                                       "goods": {                                           "subjectToIPIonInbound": false,                                           "returnedPercentageAmount": 0                                       }                                   }                               ],                               "overwrite": "no",                               "referencedItem": {                                   "documentCode": "0050569BC86C1EDB9D8B399F63C7D08D",                                   "lineCode": 1                               }                           }                       ],                       "version": "3"                    }                    } 
```

## Partial outbound goods return

State From

SP

State To

SP

hsCode

4901.10.00

### Payload request

[![Closed](https://avalara-devdocs-prod.mcoutput.com/goods-calculation-en/Skins/Default/Stylesheets/Images/transparent.gif)View example](javascript:void\(0\);)

```
 {                    "header":                    {                    "transactionDate":"2021-02-21T10:31:01Z",                    "amountCalcType":"gross",                    "documentCode":"Return",                    "invoicesRefs":                    [                    {                    "type":"documentCode",                    "documentCode":"0050569BC86C1EDB9D8B399F63C7D08D"                    }                    ],                    "goods":                    {                    "model":"55"                    },                    "messageType":"goods",                    "eDocCreatorType":"self",                    "eDocCreatorPerspective":true,                    "companyLocation":"12345678",                    "locations":                    {                    "establishment":                    {                    "activitySector":                    {                    "type":"activityLine",                    "code":"importer"                    },                    "taxesSettings":                    {                    "icmsTaxPayer":true,                    "pCredSN":0,                    "subjectToPayrollTaxRelief":true,                    "subjectWithholdingIss":true                    },                    "taxRegime":"realProfit",                    "entityType":"business",                    "stateTaxId":"999999999",                    "type":"business",                    "address":                    {                    "zipcode":"04561-004",                    "state":"SP",                    "country":"BRA"                    },                    "federalTaxId":"999999999"                    },                    "entity":                    {                    "activitySector":                    {                    "type":"activityLine",                    "code":"finalConsumer"                    },                    "taxesSettings":                    {                    "icmsTaxPayer":false,                    "pCredSN":0,                    "subjectToPayrollTaxRelief":true,                    "subjectWithholdingIss":true                    },                    "taxRegime":"individual",                    "address":                    {                    "zipcode":"04710010",                    "state":"SP",                    "country":"BRA"                    },                    "federalTaxId":""                    }                    }                    },                    "lines":                    [                    {                    "id":"000010",                    "lineCode":"1",                    "operationType":"salesReturn",                    "lineAmount":0,                    "lineUnitPrice": 100,                    "useType":"use or consumption",                    "numberOfItems":5,                    "otherCostAmount":0.00,                    "freightAmount":0.00,                    "insuranceAmount":0.00,                    "lineTaxedDiscount":0.00,                    "itemDescriptor":                    {                    "taxCode":"",                    "hsCode":"4901.10.00",                    "source":"0",                    "productType":"FOR PRODUCT",                    "manufacturerEquivalent":false,                    "appropriateIPIcreditWhenInGoing":false,                    "appropriateICMScreditWhenInGoing":false,                    "usuallyAppropriatePISCOFINSCredit":false,                    "isPisCofinsEstimatedCredit":false,                    "piscofinsRevenueType":"01",                    "unitIPIfactor":1,                    "unitIcmsfactor":1,                    "unitIcmsStfactor":1,                    "unitPisCofinsfactor":1,                    "comexTaxUnitFactor":1                    },                    "customProperties":                    [                    {                    "goods":                    {                     "subjectToIPIonInbound":false,                     "returnedPercentageAmount":0                    }                    }                    ]                    }                    ]                    } 
```

### Payload response

[![Closed](https://avalara-devdocs-prod.mcoutput.com/goods-calculation-en/Skins/Default/Stylesheets/Images/transparent.gif)View example](javascript:void\(0\);)

```
 {                    "header": {                       "transactionDate": "2021-02-21T10:31:01Z",                       "amountCalcType": "gross",                       "documentCode": "Return",                       "invoicesRefs": [                           {                               "type": "documentCode",                               "documentCode": "0050569BC86C1EDB9D8B399F63C7D08D",                               "found": true                           }                       ],                       "goods": {                           "model": "55",                           "idDest": 1,                           "tpEmis": "1",                           "class": "DEVOLUÇÃO DE VENDA",                           "tpImp": "1"                       },                       "messageType": "goods",                       "eDocCreatorType": "self",                       "eDocCreatorPerspective": true,                       "companyLocation": "12345678",                       "locations": {                           "establishment": {                               "activitySector": {                                   "type": "activityLine",                                   "code": "importer"                               },                               "taxesSettings": {                                   "icmsTaxPayer": true,                                   "pCredSN": 0,                                   "subjectToPayrollTaxRelief": true,                                   "subjectWithholdingIss": true,                                   "enableCprb": false,                                   "usesInssCprbToGrossValue": false,                                   "pisCofinsIcmsTaxRelief": false                               },                               "taxRegime": "realProfit",                               "entityType": "business",                               "stateTaxId": "999999999",                               "type": "business",                               "address": {                                   "zipcode": "04561-004",                                   "state": "SP",                                   "country": "BRA",                                   "cityCode": 3550308,                                   "countryCode": "0",                                   "cityName": "São Paulo"                               },                               "federalTaxId": "999999999"                           },                           "entity": {                               "activitySector": {                                   "type": "activityLine",                                   "code": "finalConsumer"                               },                               "taxesSettings": {                                   "icmsTaxPayer": false,                                   "pCredSN": 0,                                   "subjectToPayrollTaxRelief": true,                                   "subjectWithholdingIss": true,                                   "enableCprb": false,                                   "usesInssCprbToGrossValue": false,                                   "pisCofinsIcmsTaxRelief": false                               },                               "taxRegime": "individual",                               "address": {                                   "zipcode": "04710010",                                   "state": "SP",                                   "country": "BRA",                                   "cityCode": 3550308,                                   "countryCode": "0",                                   "cityName": "São Paulo"                               },                               "federalTaxId": ""                           }                       },                       "accountId": "",                       "subscriptionId": "",                       "additionalInfo": {                           "complementaryInfo": "Base de calculo de IPI R$: 500,00\nValor IPI R$: 0,00"                       }                    },                    "lines": [                       {                           "id": "000010",                           "lineCode": 1,                           "operationType": "salesReturn",                           "lineAmount": 500,                           "lineUnitPrice": 100,                           "useType": "use or consumption",                           "numberOfItems": 5,                           "otherCostAmount": 0,                           "freightAmount": 0,                           "insuranceAmount": 0,                           "lineTaxedDiscount": 0,                           "itemDescriptor": {                               "taxCode": "",                               "hsCode": "4901.10.00",                               "source": "0",                               "productType": "FOR PRODUCT",                               "manufacturerEquivalent": false,                               "appropriateIPIcreditWhenInGoing": false,                               "appropriateICMScreditWhenInGoing": false,                               "usuallyAppropriatePISCOFINSCredit": false,                               "isPisCofinsEstimatedCredit": false,                               "piscofinsRevenueType": "01",                               "unitIPIfactor": 1,                               "unitIcmsfactor": 1,                               "unitIcmsStfactor": 1,                               "unitPisCofinsfactor": 1,                               "comexTaxUnitFactor": 1                           },                           "customProperties": [                               {                                   "goods": {                                       "subjectToIPIonInbound": false,                                       "returnedPercentageAmount": 0                                   }                               }                           ],                           "overwrite": "proportional",                           "referencedItem": {                               "documentCode": "0050569BC86C1EDB9D8B399F63C7D08D",                               "lineCode": 1                           },                           "goods": {                               "subjectToIPIonInbound": false,                               "entityIcmsStSubstitute": "no"                           },                           "taxDetails": [                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Informative",                                       "impactOnNetAmount": "Informative",                                       "accounting": "none"                                   },                                   "taxType": "aproxtribFed",                                   "citation": "Trib aprox R$ 42,00 Federal e R$ 180,00 Estadual Fonte: IBPT",                                   "subtotalTaxable": 1000,                                   "rate": 4.2,                                   "tax": 42,                                   "exemptionCode": ""                               },                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Informative",                                       "impactOnNetAmount": "Informative",                                       "accounting": "none"                                   },                                   "taxType": "aproxtribState",                                   "citation": null,                                   "subtotalTaxable": 1000,                                   "rate": 18,                                   "tax": 180,                                   "exemptionCode": ""                               },                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "none"                                   },                                   "taxType": "cofins",                                   "citation": "PIS/COFINS com alíquota zero conforme: \"Lei nº 10.865/2004, Artigo 28, Inciso VI, incluído pela Lei nº 11.033/2004\"",                                   "subtotalTaxable": 500,                                   "rate": 0,                                   "tax": 0,                                   "exemptionCode": "",                                   "cst": "98",                                   "pRedBC": null,                                   "calcMode": "rate"                               },                               {                                   "jurisdictionName": "São Paulo",                                   "jurisdictionType": "State",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "asset"                                   },                                   "taxType": "icms",                                   "citation": "ICMS/SP_Decreto nº 45.490/2000, Artigo 52, Inciso I",                                   "subtotalTaxable": 500,                                   "rate": 18,                                   "tax": 90,                                   "exemptionCode": "",                                   "source": "0",                                   "cst": "00",                                   "modBC": "3"                               },                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Add",                                       "impactOnNetAmount": "Add",                                       "accounting": "none"                                   },                                   "taxType": "ipiReturned",                                   "citation": "Base de calculo de IPI R$: 500,00\nValor IPI R$: 0,00",                                   "subtotalTaxable": 500,                                   "rate": 0,                                   "tax": 0,                                   "exemptionCode": "",                                   "cst": "03",                                   "legalTaxClass": 999,                                   "calcMode": "rate",                                   "isCustomCitation": false                               },                               {                                   "jurisdictionName": "Brazil",                                   "jurisdictionType": "Country",                                   "taxImpact": {                                       "impactOnFinalPrice": "Included",                                       "impactOnNetAmount": "Included",                                       "accounting": "none"                                   },                                   "taxType": "pis",                                   "citation": "PIS/COFINS com alíquota zero conforme: \"Lei nº 10.865/2004, Artigo 28, Inciso VI, incluído pela Lei nº 11.033/2004\"",                                   "subtotalTaxable": 500,                                   "rate": 0,                                   "tax": 0,                                   "exemptionCode": "",                                   "cst": "98",                                   "pRedBC": null,                                   "calcMode": "rate"                               }                           ],                           "cfop": 1201,                           "lineAdditionalInfo": "",                           "lineNetFigure": 410                       }                    ],                    "version": "3",                    "processingInfo": {                       "versionId": "21.3.5-rc.1",                       "duration": "7.670"                    },                    "summary": {                       "numberOfLines": 1,                       "totalLineAmounts": 500,                       "totalTaxedDiscounts": 0,                       "totalUntaxedDiscounts": 0,                       "totalInsurances": 0,                       "totalFreights": 0,                       "totalOtherCosts": 0,                       "totalUnTaxedOtherCosts": 0,                       "totalInvoice": 500,                       "taxByType": {                           "aproxtribFed": {                               "tax": 42,                               "subtotalTaxable": 1000,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 42                                   }                               ]                           },                           "aproxtribState": {                               "tax": 180,                               "subtotalTaxable": 1000,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 180                                   }                               ]                           },                           "cofins": {                               "tax": 0,                               "subtotalTaxable": 500,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 0                                   }                               ]                           },                           "icms": {                               "tax": 90,                               "subtotalTaxable": 500,                               "jurisdictions": [                                   {                                       "jurisdictionName": "São Paulo",                                       "jurisdictionType": "State",                                       "tax": 90                                   }                               ]                           },                           "ipiReturned": {                               "tax": 0,                               "subtotalTaxable": 500,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 0                                   }                               ]                           },                           "pis": {                               "tax": 0,                               "subtotalTaxable": 500,                               "jurisdictions": [                                   {                                       "jurisdictionName": "Brazil",                                       "jurisdictionType": "Country",                                       "tax": 0                                   }                               ]                           }                       }                    },                    "input": {                       "header": {                           "transactionDate": "2021-02-21T10:31:01Z",                           "amountCalcType": "gross",                           "documentCode": "Return",                           "invoicesRefs": [                               {                                   "type": "documentCode",                                   "documentCode": "0050569BC86C1EDB9D8B399F63C7D08D",                                   "found": true                               }                           ],                           "goods": {                               "model": "55",                               "idDest": 0,                               "tpEmis": "1"                           },                           "messageType": "goods",                           "eDocCreatorType": "self",                           "eDocCreatorPerspective": true,                           "companyLocation": "12345678",                           "locations": {                               "establishment": {                                   "activitySector": {                                       "type": "activityLine",                                       "code": "importer"                                   },                                   "taxesSettings": {                                       "icmsTaxPayer": true,                                       "pCredSN": 0,                                       "subjectToPayrollTaxRelief": true,                                       "subjectWithholdingIss": true,                                       "enableCprb": false,                                       "usesInssCprbToGrossValue": false,                                       "pisCofinsIcmsTaxRelief": false                                   },                                   "taxRegime": "realProfit",                                   "entityType": "business",                                   "stateTaxId": "999999999",                                   "type": "business",                                   "address": {                                       "zipcode": "04561-004",                                       "state": "SP",                                       "country": "BRA",                                       "cityCode": 3550308,                                       "countryCode": "0",                                       "cityName": "São Paulo"                                   },                                   "federalTaxId": "999999999"                               },                               "entity": {                                   "activitySector": {                                       "type": "activityLine",                                       "code": "finalConsumer"                                   },                                   "taxesSettings": {                                       "icmsTaxPayer": false,                                       "pCredSN": 0,                                       "subjectToPayrollTaxRelief": true,                                       "subjectWithholdingIss": true,                                       "enableCprb": false,                                       "usesInssCprbToGrossValue": false,                                       "pisCofinsIcmsTaxRelief": false                                   },                                   "taxRegime": "individual",                                   "address": {                                       "zipcode": "04710010",                                       "state": "SP",                                       "country": "BRA",                                       "cityCode": 3550308,                                       "countryCode": "0",                                       "cityName": "São Paulo"                                   },                                   "federalTaxId": ""                               }                           },                           "accountId": "",                           "subscriptionId": ""                       },                       "lines": [                           {                               "id": "000010",                               "lineCode": 1,                               "operationType": "salesReturn",                               "lineAmount": 0,                               "lineUnitPrice": 100,                               "useType": "use or consumption",                               "numberOfItems": 5,                               "otherCostAmount": 0,                               "freightAmount": 0,                               "insuranceAmount": 0,                               "lineTaxedDiscount": 0,                               "itemDescriptor": {                                   "taxCode": "",                                   "hsCode": "4901.10.00",                                   "source": "0",                                   "productType": "FOR PRODUCT",                                   "manufacturerEquivalent": false,                                   "appropriateIPIcreditWhenInGoing": false,                                   "appropriateICMScreditWhenInGoing": false,                                   "usuallyAppropriatePISCOFINSCredit": false,                                   "isPisCofinsEstimatedCredit": false,                                   "piscofinsRevenueType": "01",                                   "unitIPIfactor": 1,                                   "unitIcmsfactor": 1,                                   "unitIcmsStfactor": 1,                                   "unitPisCofinsfactor": 1,                                   "comexTaxUnitFactor": 1                               },                               "customProperties": [                                   {                                       "goods": {                                           "subjectToIPIonInbound": false,                                           "returnedPercentageAmount": 0                                       }                                   }                               ],                               "overwrite": "no",                               "referencedItem": {                                   "documentCode": "0050569BC86C1EDB9D8B399F63C7D08D",                                   "lineCode": 1                               }                           }                       ],                       "version": "3"                    }                    } 
```