Invoice currency conversion

Invoice currency conversion

Advice: AvaTax for VAT invoice currency conversion is not required; this section is provided for informational purposes. If you do perform currency conversion in AvaTax for VAT, all lines on the transaction must be in the same currency.

AvaTax for VAT invoice currency conversion supports use cases where a customer needs to provide their local taxing authority with the invoice tax details in a local currency.

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

  • exchangeRateCurrencyCode
  • exchangeRate

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

  • exchangeRateEffectiveDate

Currency conversion fields

The table below describes the fields that can be specified in the CreateTransactionModel to perform currency conversion.  

FieldAttributesDescription
exchangeRate

double

Currency exchange rate used to convert tax details from the invoice currency to a second reporting currency.

This field is optional.

exchangeRateCurrencyCodestring

A three-character ISO 4217 currency code specifying the reporting exchange rate for this transaction.

This is required ifexchangeRate is provided.

exchangeRateEffectiveDatedate

The effective date of the exchange rate.

This field is optional and defaults to the transactiondate.

Currency conversion reporting fields

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

FieldDescription
reportingTaxableUnitsThe 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 theexchangeRateCurrencyCode.
reportingNonTaxableUnitsThe non-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 theexchangeRateCurrencyCode.
reportingExemptUnitsThe 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 theexchangeRateCurrencyCode.
reportingTaxThe total amount of converted tax for this line.
reportingTaxCalculatedThe total amount of converted calculated tax for this line.
liabilityTypeSpecifies who in the transaction is liable for tax for this line item.

Example

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

Specify theexchangeRate,exchangeRateCurrencyCode, andexchangeRateEffectiveDate fields at the document level.

curl
-X POST
-H 'Accept: application/json'
-H 'Authorization: Basic aHR0cHdhdQNoOmY='
-H 'Content-Type: application/json'
--data '{
"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":""
},
"pointOfOrderOrigin":{
"line1":"Skovvej 3B",
"city":"Klampenborg",
"region":"Klampenborg",
"country":"DK",
"postalCode":""
},
"pointOfOrderAcceptance":{
"line1":"Walcherbauer 9",
"line2":"3343 Walcherbauer",
"city":"Walcherbauer",
"region":"Walcherbauer",
"country":"AT",
"postalCode":""
},
"goodsPlaceOrServiceRendered":{
"line1":"Skovvej 3B",
"city":"Klampenborg",
"region":"Klampenborg",
"country":"DK",
"postalCode":""
},
"import":{
"line1":"Skovvej 3B",
"city":"Klampenborg",
"region":"Klampenborg",
"country":"DK",
"postalCode":""
}
},
"parameters":[
{
"name": "Transport",
"value": "Seller"
}
],
"type":"SalesInvoice",
"companyCode":"DEFAULT",
"date":"2021-01-01",
"customerCode":"ABC",
"purchaseOrderNo":"2021-1-1-001",
"commit":false,
"currencyCode":"EUR",
"exchangeRate": "7.44",
"exchangeRateCurrencyCode": "DKK",
"exchangeRateEffectiveDate": "2020-12-03",
"description":"Yarn"
}'
'https://sandbox.admin.avalara.com/api/v2/transactions/create'

Even though the currency converion fields are specified at the document level in a transaction, the response includes the following fields in the transaction line level detail.

{
"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": "2021-01-01",
"revAccount": "",
"sourcing": "Origin",
"tax": 25,
"taxableAmount": 100,
"taxCalculated": 25,
"taxCode": "P0000000",
"taxCodeId": 8087,
"taxDate": "2021-01-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"
}
],
...
}
]
}