# Invoicing in a foreign currency from Greece: the myDATA exchange rate via API

> Your customer pays in pounds or dollars. What you send to myDATA: the amounts stay in euro, and the currency and exchange_rate fields add one payable line in the customer's currency. Which way round the rate goes, why nothing warns you if it is inverted, and the errors you will see.
>
> AI-friendly Markdown version. HTML version: https://wrapp.ai/en/resources/invoice-foreign-currency-greece-mydata-api
> EL version: https://wrapp.ai/el/resources/timologio-se-kseno-nomisma-mydata.md

A developer at a Greek software company bills a client in London who pays in pounds. A freelancer in Greece works remotely for a UK company. A payment system hands over every transaction in its own currency. They all ask the same question: **what do I send to myDATA when the customer pays in a foreign currency?**

**The amounts you send are in euro and stay in euro. The `currency` and `exchange_rate` fields convert nothing: they add one payable line in the customer's currency.**

That is the whole idea, and it is also where the mistake happens. Send `2000` in `net_total_amount` meaning pounds and the document says two thousand **euro**. It issues normally, it gets a ΜΑΡΚ, and no check catches it, because the amounts are internally consistent: nothing anywhere says the number meant pounds.

### What the two fields do

01

### currency

The ISO 4217 code of the customer's currency, **in uppercase**: `GBP`, `USD`. It is set at document level: one document, one currency.

02

### exchange_rate

**How many units of the currency one euro buys.** Required whenever the currency is not euro. Up to five decimal places.

03

### The amounts

In euro, as on any other document. They are what is transmitted to myDATA and what prints.

The currency is **independent of the document type and of VAT**. It is not a cross-border feature: a services invoice to a Greek customer at 24% VAT can be issued in pounds too. The VAT treatment depends on the transaction, not on the currency.

### The example used throughout

| Field | Value |
| --- | --- |
| Document | **2.3**, a services invoice to a company in the United Kingdom |
| Net amount | €2,000.00 |
| VAT | €0.00, 0% |
| Total and payable | €2,000.00 |
| `currency` | `GBP` |
| `exchange_rate` | `0.86`, for illustration: 1 EUR = 0.86 GBP |
| Payable in pounds | **£1,720.00** |

`2,000.00 × 0.86 = 1,720.00`. That one multiplication is the entire mechanism. If you can reproduce it, you know which way round the rate goes without being told twice.

POST /invoices

```json
{
  "invoice_type_code": "2.3",
  "billing_book_id": "xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "payment_method_type": 1,
  "currency": "GBP",
  "exchange_rate": 0.86,
  "net_total_amount": 2000.00,
  "vat_total_amount": 0.00,
  "total_amount": 2000.00,
  "payable_total_amount": 2000.00,
  "counterpart": {
    "name": "EXAMPLE CLIENT LTD",
    "country_code": "GB",
    "vat": "123456789",
    "city": "LONDON",
    "street": "OLD STREET",
    "number": "1",
    "postal_code": "EC1V 9HL"
  },
  "invoice_lines": [
    {
      "line_number": 1,
      "name": "Software engineering services",
      "quantity": 1,
      "quantity_type": 1,
      "unit_price": 2000.00,
      "net_total_price": 2000.00,
      "vat_rate": 0,
      "vat_total": 0.00,
      "subtotal": 2000.00,
      "vat_exemption_code": "xx",
      "classification_category": "category1_3",
      "classification_type": "E3_561_006"
    }
  ]
}
```

`billing_book_id` is the id of your services invoice series, from `GET /billing_books`: a `2.3` is issued from the same series as a `2.1`. Send `invoice_type_code` as a **string**, in quotes.

We leave `vat_exemption_code` as `xx` on purpose. Zero VAT needs an exemption reason, and the right one is a tax decision that depends on the transaction. The values are in the table of [VAT exemption reasons](https://wrapp.ai/en/resources/vat-exemption-reasons), and which one applies to you is something to confirm with your accountant, with the help of the [list of VAT exemption articles](https://wrapp.ai/en/resources/vat-exemption-articles-greece).

The `0.86` is illustrative. An exchange rate is a number of the day, not a constant: do not write it into your code once.

### What your customer sees

The whole document in euro: lines, net, VAT, total, payable. Below that, **one** extra line:

| Document language | The line |
| --- | --- |
| Greek | Πληρωτέο (Λίρα Η.Β.) **£1.720,00** |
| English | Payable (British Pound) **£1.720,00** |

The currency's name appears in the document's language, with its symbol, and the amount uses Greek number formatting in both. The rate itself is **not printed**, and neither is the ISO code. If your customer expects an invoice entirely in pounds, tell them beforehand what they will see, or they will find out when they open it.

### An inverted rate is caught by nothing

**Send the reciprocal rate and the document issues, myDATA accepts it, you get a ΜΑΡΚ, and the line in pounds is wrong.** No check can catch it. The amounts are in euro and consistent whatever number sits in `exchange_rate`, so every check that exists still passes. myDATA's only currency checks are whether a rate is present and whether the code is valid. Nothing looks at the magnitude.

Two consequences a developer will not draw on their own:

- **Check the direction with arithmetic, not with a successful response.** A clean ΜΑΡΚ says nothing about the rate. The test is: does the euro total times the rate equal what the customer owes in their own currency?
- **Read the rate in the orientation your source quotes it.** A rate quoted as "1 EUR = 0.86 GBP" goes in as `0.86`. A rate quoted as "1 GBP = 1.16 EUR" must be inverted first.

**Decimals** matter too. The rate keeps up to five decimal places and uses all of them: with `0.85934` the line reads £1.718,68. A sixth decimal is rounded to five without a warning.

### The payment's currency is not the document's currency

If issuance starts from a payment system's notification, and that notification carries the amount in the currency the customer paid in, perhaps in its smallest unit, pence or cents, that pair **does not go straight** into `POST /invoices`. Convert to euro first, and the euro amounts fill the amount fields. The currency and rate go into `currency` and `exchange_rate`, only if you also want the payable amount shown in the customer's currency.

### What you see when it is wrong

| Mistake | From | Response |
| --- | --- | --- |
| A currency without `exchange_rate` | Platform | `Invoice Errors`: "Exchange rate can't be blank". No document is created |
| A lowercase currency code (`gbp`) or one outside the list | myDATA | **101**, "The Enumeration constraint failed" on `CurrencyType` |
| `invoice_type_code` as a number (`2.3` without quotes) | myDATA | The draft is accepted, then at issue **204** and **205** for fields that do not fit the type |
| An inverted rate | No one | **Nothing.** A clean ΜΑΡΚ and a wrong line in pounds |

The "From" column is worth your time. **A rejection by the platform costs nothing. A rejection by myDATA has already used a number in your series.** So test your currency mapping on the codes: get the list right once, in uppercase, and the expensive failure disappears.

### What the rule says

The EU VAT Directive 2006/112/EC, in [Article 230](https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:02006L0112-20250101), allows the amounts on an invoice to be expressed in any currency, **provided that the VAT payable is expressed in the national currency** of the Member State. Because the amount fields stay in euro, the document meets that condition by construction: the VAT is already in euro, and the line in the foreign currency is information for the customer.

Which rate you use, from which source and as of which date, and the exchange differences when you get paid, are a matter for your accounting policy and your accountant. The platform does not choose a rate: it prints the one you send.

### How to start

You open staging yourself: sign up free at [wrapp.ai](https://wrapp.ai/en/users/new) with your VAT number and, once you have set a password, press «Try the API». You get a login email and an API key for staging.wrapp.ai, with the billing books already set up. The example invoice is issued from the «Τιμ. Παροχής» services invoice book, whose id comes from `GET /billing_books`.

The full field schema is in the [REST API documentation](https://wrapp.ai/api/documentation). For the VAT treatment and classification of the transaction itself, see the guides to [invoicing a customer outside the EU](https://wrapp.ai/en/resources/invoice-non-eu-third-country-greece) and [intra-community invoicing](https://wrapp.ai/en/resources/intra-community-invoice-greece), and for sales to consumers in other EU countries the guide to [distance sales and OSS](https://wrapp.ai/en/resources/oss-eu-distance-sales-mydata-invoicing). Accepted values are in the reference tables for [invoice types](https://wrapp.ai/en/resources/invoice-types) and [classification types](https://wrapp.ai/en/resources/classification-types).

*The structure in this article is what we typically see in practice. The **classifications**, **VAT rates** and **exemption reasons** are an accounting decision though, so confirm them with the end customer or their accountant before going to production. myDATA does not validate them and will accept a wrong choice without an error.*

## Frequently asked questions

### Can I issue an invoice in pounds or dollars and still transmit it to myDATA?

Yes. You send the amounts in euro as usual and add two fields: currency, with the currency code (e.g. GBP), and exchange_rate, with the rate. The document is transmitted to myDATA with the amounts in euro and the currency and rate alongside, and it prints one extra line with the payable amount in the customer's currency.

### Which currency do the amounts reach myDATA in?

Euro. The amount fields you send are euro and stay euro: they are what is transmitted to myDATA and what prints on the document. currency and exchange_rate convert nothing. Send 2000 in net_total_amount meaning pounds and the document says two thousand euro, and no check anywhere catches it.

### Which way round does the exchange rate go?

How many units of the foreign currency one euro buys. If 1 EUR = 0.86 GBP, you send 0.86, not 1.16. If your source quotes it the other way round ("1 GBP = 1.16 EUR"), invert it before sending. The test is arithmetic: the euro total times the rate must equal what the customer owes in their own currency.

### What will my customer see on the invoice?

The whole document in euro: lines, net, VAT, total and payable. Below that, one extra line with the payable amount in their currency, for example "Payable (British Pound) £1.720,00" in English or «Πληρωτέο (Λίρα Η.Β.) £1.720,00» in Greek. The rate itself is not printed.

### Which exchange rate should I use?

Which rate, from which source and as of which date is a matter for your accounting policy, and your accountant decides it, along with any exchange differences on settlement. The platform does not choose a rate for you: it prints the one you send. Do not hard-code a rate either: a rate written once becomes a wrong number as the days pass.

### Does it only work for customers abroad?

No. The currency is independent of the document type and of VAT. A services invoice to a Greek customer at 24% VAT can be issued in pounds too, with the amounts in euro and the payable line in pounds below. The currency does not change the VAT treatment: that depends on the transaction.

### Can one invoice have lines in different currencies?

No. The currency is set at document level: one document, one currency.

### Why does myDATA return error 101 on currency?

Because the code is not in myDATA's currency list, or it is written in lowercase. The field takes the ISO 4217 code in uppercase: GBP, not gbp. The error comes from myDATA at issue time, so the series number has already been used.

### How many decimals does the exchange rate take?

Up to five, and all of them are used in the calculation. With 0.85934 and a payable of 2,000.00 euro, the line reads £1.718,68. A sixth decimal is rounded to five without a warning.

### How do I test before going live?

Need help? Contact us: https://wrapp.ai/contact
