easyway
Sign inCreate free account

Accept euro stablecoin payments: invoice in EURC or in US dollars

Your prices are in euros, but most crypto is priced in dollars. easyway gives you two ways to bill a euro order: ask for the exact amount in EURC, Circle's euro stablecoin, or convert the price to US dollars yourself and let the customer pay with any coin. Both are one API call. They differ in who carries the exchange rate, which coins the customer can use and what ends up on your balance.

The two invoices side by side

The only difference in the request is the currency field: "EURC_ERC20" or "USD".

currency "EURC_ERC20"currency "USD"
The customer paysExactly your euro price, in EURCYour USD amount, converted to the chosen coin at the market rate when they pick it
Coins on the checkoutEURC on Ethereum only, nothing to chooseEvery coin, or the ones you list in allowed_assets
Exchange rateNone: euros in, euros outYours (EUR to USD) and the market's (USD to the coin)
When rate sources are downStill works: the amount needs no rateA live invoice refuses to quote: 503 rate_unavailable
Largest invoiceNo dollar cap1,000,000 USD (above it: amount_too_large)
Lands on your balanceEURCThe coin the customer paid with
amount and currency in the API and webhooksThe EURC price, EURC_ERC20The USD price, USD

An EURC-priced invoice has its coin fixed when it is created, so the response already holds the amount and the Ethereum address: a payer can't switch it to USDC on the checkout. Adding allowed_assets without EURC to such an invoice fails with asset_not_allowed. If you want euros and a choice of coins, the USD invoice is the tool.

When to bill in EURC

Pick EURC when your customers already hold it, typically European businesses paying another business, and when you want your books to stay in euros end to end. A 250 EUR order asks for 250 EURC, the 0.5% platform fee is taken in EURC, and 1,000 EURC received leaves 995 EURC on your balance. Nothing is converted, so there is no rate to explain to an accountant.

Only EURC on Ethereum counts. Circle issues it on other networks too, but those are separate contracts and the invoice stays open; the EURC page lists the accepted contract and the look-alikes. The payment is credited after 12 Ethereum confirmations, and the customer needs a little ETH for gas, as for any ERC-20 transfer.

When to bill in US dollars

Pick USD when most customers pay in USDT or USDC, or when you want to offer several networks. You convert the euro price to dollars once, with a rate you choose, and from then on the invoice works like any other: the coin amount is locked from the moment the customer picks a coin until the invoice expires (see USD or coin pricing). Store your euro price and the rate you used in metadata; it comes back with every webhook, so your records can show both numbers.

A customer who pays a USD invoice in EURC gets an amount close to your euro price, but not exactly it: your EUR/USD rate and the market price of EURC are never quite the same, and the coin amount is rounded up. If the cent matters, bill in EURC.

One script for both

This Node.js script takes an order id, a euro price and a mode. In eurc mode it asks for the exact EURC amount; in any mode it reads the European Central Bank's daily reference rate, converts the price to dollars with integer arithmetic (rounding up to the cent) and offers EURC, USDC and USDT. It needs no packages:

// euro-invoice.mjs: a checkout for an order priced in euros (Node 18+, no SDK).
//   node euro-invoice.mjs 1042 49.90 eurc   -> exactly 49.90 EURC
//   node euro-invoice.mjs 1042 49.90 any    -> a USD invoice from today's ECB rate
const [orderId, eur, mode = "eurc"] = process.argv.slice(2);
if (!/^\d+$/.test(orderId ?? "") || !/^\d+(\.\d{1,2})?$/.test(eur ?? "")) {
  throw new Error("usage: node euro-invoice.mjs <order id> <price in EUR, e.g. 49.90> [eurc|any]");
}
const API = process.env.EASYWAY_API ?? "https://api.easyway.cash";

// The ECB's daily reference rate: how many US dollars one euro buys.
async function eurUsd() {
  const res = await fetch("https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml", {
    signal: AbortSignal.timeout(10_000),
  });
  const rate = (await res.text()).match(/currency='USD' rate='(\d+\.\d+)'/)?.[1];
  if (!rate) throw new Error("no USD rate in the ECB feed");
  return rate;
}

// "49.90" EUR x "1.0801" -> "53.90" USD, rounded up to the cent, in integers only.
function toUsd(eur, rate) {
  const [ei, ef = ""] = eur.split(".");
  const [ri, rf] = rate.split(".");
  const scale = 10n ** BigInt(rf.length);
  const cents = (BigInt(ei + ef.padEnd(2, "0")) * BigInt(ri + rf) + scale - 1n) / scale;
  return `${cents / 100n}.${String(cents % 100n).padStart(2, "0")}`;
}

let body;
if (mode === "eurc") {
  body = { amount: eur, currency: "EURC_ERC20", order_id: orderId };
} else {
  const rate = await eurUsd();
  body = {
    amount: toUsd(eur, rate),
    currency: "USD",
    order_id: orderId,
    allowed_assets: ["EURC_ERC20", "USDC_ERC20", "USDT_ERC20", "USDT_TRC20"],
    metadata: { eur_price: eur, eur_usd: rate },
  };
}

const res = await fetch(`${API}/v1/invoices`, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.EASYWAY_API_KEY}`,
    "Idempotency-Key": `shop-order-${orderId}-${mode}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify(body),
  signal: AbortSignal.timeout(15_000),
});
const inv = await res.json();
if (!res.ok) throw new Error(`easyway ${res.status}: ${inv.message ?? inv.error}`);

console.log("Invoice  ", inv.id, inv.amount, inv.currency);
if (inv.pay_asset) console.log("Pay      ", inv.pay_amount, "EURC to", inv.pay_address);
console.log("Checkout ", inv.payment_url);

With an ECB rate of 1.0801, a 49.90 EUR order became a 53.90 USD invoice. The ECB publishes one rate per working day, so for prices that change during the day use your bank's or your payment processor's rate instead. The Idempotency-Key includes the mode, so a customer who switches from EURC to "any coin" gets a new invoice, while a retried request gets the same one back. Ship the order on the signed invoice.paid webhook, never on the redirect; the quickstart has the full flow.

Withdrawing euros

Asset idCredited afterPlatform feeMin. withdrawalWithdrawal fee
EURC_ERC2012 confirmations0.5%0.5 EURC1.4 EURC

EURC stays EURC on your easyway balance until you withdraw it to an Ethereum address on your whitelist, for example an exchange account where you sell it for euros. easyway doesn't convert balances between coins, so EURC and USDC are kept and withdrawn separately. Every live withdrawal needs an address you whitelisted with two-factor authentication (see security).

Common questions

Can I set "EUR" as the currency? No. The currency is "USD" or a coin's asset id; EURC is the euro option.

Can I take EURC without code? Yes. A payment link is priced in US dollars and the customer can choose EURC on the checkout.

USDC or EURC? Both are issued by Circle and both are accepted on Ethereum. USDC tracks the dollar and is also taken on more networks; the USDT vs USDC comparison covers the dollar side.

Create free accountRead the API docsAlready have an account? Sign in
Accept euro stablecoin payments: EURC or USD | easyway