# Currency conversion

Source: https://developer.avalara.com/vat-ecom/transactions/currency-conversion/

**Note**:  
Currency conversion isn't a certification requirement. We provide this section for informational purposes. If you do perform currency conversion in AvaTax, all lines on the transaction must be in the same currency.

**Limitations**:

-   The converted amounts don't flow to Avalara reports. Customers using the AvaTax API currency conversion functionality must build out their own reporting solution to make use of the converted amounts.  

-   The converted amounts don't flow to Avalara Managed Returns reporting, so Avalara Managed Returns customers shouldn't use the currency conversion functionality.

AvaTax invoice currency conversion supports use cases where a transaction is invoiced in one currency (the 'invoice currency'), but needs to be reported to appropriate local taxing authority in a different currency (the 'reporting currency').

In order to use this capability, you must specify the following fields at the document level of each transaction API call:

-   `currencyCode` (invoice currency)

-   `exchangeRateCurrencyCode` (reporting currency)

-   `exchangeRate` (from the invoice currency to the reporting currency)

Though not required, you can optionally specify the following field at the document level for the transaction as well:

-   `exchangeRateEffectiveDate`  

The numeric monetary amounts you include in the request represent the amounts in the invoice currency (`currencyCode`). AvaTax uses the provided `exchangeRate` to return converted amounts in the response, representing the amounts in the reporting currency (`exchangeRateCurrencyCode`).

## Currency conversion fields

The table below describes the fields that you can specify in the [CreateTransactionModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/CreateTransactionModel/) to perform currency conversion.

Field

Attributes

Description

`currencyCode`  

string

The three-character ISO 4217 currency code representing the ‘invoice currency’ (the currency the transaction was invoiced in). If this is different than the currency the tax liability needs to be reported in, you’ll also need to provide the `exchangeRateCurrencyCode` and the `exchangeRate` for conversion to the reporting country.

`exchangeRate`  

double

The currency exchange rate from the invoice currency (`currencyCode`) to the reporting currency (`exchangeRateCurrencyCode`).

This only needs to be set if the invoice currency and the reporting currency are different. It defaults to 1.0.

`exchangeRateCurrencyCode`  

string

The three-character ISO 4217 currency code representing the 'reporting currency' (the currency the transaction’s tax liability needs to be reported in). You can leave this blank if the invoice currency provided in the `currencyCode` field is also the reporting currency.

`exchangeRateEffectiveDate`  

date

The effective date of the exchange rate.

This field is optional and defaults to the transaction `date`.

## Currency conversion reporting fields

For every line in a transaction that uses currency conversion, the following reporting fields are available in the line detail level.

Field

Description

`reportingTaxableUnits`  

The taxable units used in the calculation of the converted tax. If the units are a currency value, then the units will be converted to the currency specified by the `exchangeRateCurrencyCode`.

`reportingNonTaxableUnits`  

The nontaxable units used in the calculation of the converted tax. If the units are a currency value, then the units will be converted to the currency specified by the `exchangeRateCurrencyCode`.

`reportingExemptUnits`  

The exempt units used in the calculation of the converted tax. If the units are a currency value, then the units will be converted to the currency specified by the `exchangeRateCurrencyCode`.

`reportingTax`  

The total amount of converted tax for this line.

`reportingTaxCalculated`  

The total amount of converted calculated tax for this line.

`liabilityType`  

Specifies who in the transaction is liable for tax for this line item.

## Examples

Click on a link below to view an example request and response for a transaction that uses currency conversion.

In this example, the transaction shipped from Denmark to Austria. The invoice currency (`currencyCode`) is DKK for Danish krone, and the reporting currency (`exchangeRateCurrencyCode`) is EUR for Euro.

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

```
{  "lines": [    {      "number":"1",      "quantity":100,      "amount":100,      "taxCode":"P0000000",      "itemCode":"Y0001",      "description":"Yarn",      "taxIncluded": false,      "discounted": false    }  ],  "addresses": {    "shipFrom":{      "line1":"Skovvej 3B",      "city":"Klampenborg",      "region":"Klampenborg",      "country":"DK",      "postalCode":""    },    "shipTo":{      "line1":"Walcherbauer 9",      "line2":"3343 Walcherbauer",      "city":"Walcherbauer",      "region":"Walcherbauer",      "country":"AT",      "postalCode":""    }  },   "parameters":[    {      "name": "Transport",      "value": "Seller"    }  ],  "type":"SalesInvoice",  "companyCode":"DEFAULT",  "date":"2024-07-01",  "customerCode":"ABC",  "purchaseOrderNo":"2024-07-1-001",  "commit":false,  "currencyCode":"EUR",  "exchangeRate": "7.44",  "exchangeRateCurrencyCode": "DKK",  "exchangeRateEffectiveDate": "2024-07-01",  "description":"Yarn"}
```

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

```
{  "lines": [    {      "id": 6207456853,      "transactionId": 7038119395,      "lineNumber": "1",      "boundaryOverrideId": 0,      "customerUsageType": "",      "entityUseCode": "",      "description": "Yarn",      "destinationAddressId": 7731503318,      "originAddressId": 9731503323,      "discountAmount": 0,      "discountTypeId": 0,      "exemptAmount": 0,      "exemptCertId": 0,      "exemptNo": "",      "isItemTaxable": true,      "isSSTP": false,      "itemCode": "Y0001",      "lineAmount": 100,      "quantity": 100,      "ref1": "",      "ref2": "",      "reportingDate": "2024-07-01",      "revAccount": "",      "sourcing": "Origin",      "tax": 25,      "taxableAmount": 100,      "taxCalculated": 25,      "taxCode": "P0000000",      "taxCodeId": 8087,      "taxDate": "2024-07-01",      "taxEngine": "",      "taxOverrideType": "None",      "businessIdentificationNo": "",      "taxOverrideAmount": 0,      "taxOverrideReason": "",      "taxIncluded": false,        "details": [        {          ...          "tax": 25,          "taxableAmount": 100,          "taxType": "Output",          "taxSubTypeId": "O",          "taxTypeGroupId": "InputAndOutput",          "taxName": "Standard Rate",          "taxAuthorityTypeId": 45,          "taxRegionId": 205080,          "taxCalculated": 25,          "taxOverride": 0,          "rateType": "Standard",          "rateTypeCode": "S",          "taxableUnits": 100,          "nonTaxableUnits": 0,          "exemptUnits": 0,          "unitOfBasis": "PerCurrencyUnit",          "isNonPassThru": false,          "isFee": false,          "reportingTaxableUnits": 744,          "reportingNonTaxableUnits": 0,          "reportingExemptUnits": 0,          "reportingTax": 186,          "reportingTaxCalculated": 186,          "liabilityType": "Seller"        }      ],      ...    }  ]}
```