Currencies

Read about the various ways you can specify the currency in your Documents.

There are a number of different currencies that you can specify in your e-invoices and credit notes:

ElementDescription
DocumentCurrencyCodeDocument Currency: The main currency as specified in the Invoice element.
TaxCurrencyCodeCurrency used for taxes. See Tax Exchange Rates .
@currencyIDUse this attribute to assign currencies to elements like TaxAmount.
PaymentAlternativeCurrencyCodeThe currency used for alternate payments.
PricingCurrencyCodeThe currency used for prices. See Prices

You use the values from the ISO 4217 list as the value for these elements.

Restrictions

  • The currency that you specify in the DocumentCurrencyCode element must match the attribute currencies that you specify for other elements. This does not apply to the TaxTotal or TaxSubTotal elements. These currencies will be checked during processing.

Document Currency

The main currency is known as the Document Currency. It is specified in the DocumentCurrencyCode element. Here is a snippet with an example:

<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2"
	xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"
	xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
	<cbc:ID>INV12345</cbc:ID>
	<cbc:IssueDate>2017-11-26</cbc:IssueDate>
	<cbc:IssueTime>15:30:00Z</cbc:IssueTime>
	<cbc:InvoiceTypeCode listVersionID="1.0">01</cbc:InvoiceTypeCode>
	<cbc:DocumentCurrencyCode>MYR</cbc:DocumentCurrencyCode>

Attribute Currencies

For certain elements. you must use the @currencyID attribute to specify the currency. For example, the following specifies a price of 30 Euro:

<cbc:PriceAmount currencyID="EUR">30</cbc:PriceAmount>

You must do this for the following elements, amongst others:

  • Amount
  • BaseAmount
  • LineExtensionAmount
  • PriceAmount

These will be checked against the value specified in the DocumentCurrencyCode element.

Foreign Currency Transactions

There are a couple of situations where you may want to model a foreign and domestic currency. The following example is from the Malaysia: Tax for Foreign Currency Transactions. As you can see, there are 2 groups of elements. The first shows the foreign currency and the second shows the domestic:

<ubl:Invoice>
    <!-- Code omitted for clarity -->
    
    <!-- first tax total group in document (foreign) currency (example: USD) -->
    <cac:TaxTotal>
        <cbc:TaxAmount currencyID="USD">285</cbc:TaxAmount>
        <cac:TaxSubtotal>
            <cbc:TaxableAmount currencyID="USD">1900</cbc:TaxableAmount>
            <cbc:TaxAmount currencyID="USD">285</cbc:TaxAmount>
            <cac:TaxCategory>
                <cbc:ID>S</cbc:ID>
                <cbc:Percent>15.00</cbc:Percent>
                <cac:TaxScheme>
                    <cbc:ID>VAT</cbc:ID>
                </cac:TaxScheme>
            </cac:TaxCategory>
        </cac:TaxSubtotal>
    </cac:TaxTotal>
    
    <!-- second tax total group in tax currency (MYR) -->
    <cac:TaxTotal>
        <cbc:TaxAmount currencyID="MYR">1348.91</cbc:TaxAmount>
        <cac:TaxSubtotal>
            <cbc:TaxableAmount currencyID="MYR">8992.70</cbc:TaxableAmount>
            <cbc:TaxAmount currencyID="MYR">1348.91</cbc:TaxAmount>
            <cac:TaxCategory>
                <cbc:ID>S</cbc:ID>
                <cbc:Percent>15.00</cbc:Percent>
                <cac:TaxScheme>
                    <cbc:ID>VAT</cbc:ID>
                </cac:TaxScheme>
            </cac:TaxCategory>
        </cac:TaxSubtotal>
    </cac:TaxTotal>
     <!-- Code omitted for clarity -->
</ubl:Invoice>

Country Specific Variations

Country specific variations are explained in the following topics: