---
eip: 681
label: ERC-681
title: URL Format for Transaction Requests
status: Final
type: Standards Track
category: ERC
created: 2017-08-01
requires: 20, 137
official: https://eips.ethereum.org/EIPS/eip-681
source: https://github.com/ethereum/ERCs/blob/master/ERCS/erc-681.md
canonical: https://eips.huatuo.xyz/eip-681/
lang: en
tldr: "Defines ethereum: URLs for payment and transaction requests, so a QR code or link can open any wallet with the recipient, amount, token and chain already filled in."
tags: [wallet, uri, payments, qr-code]
---

# ERC-681: URL Format for Transaction Requests

> A standard way of representing various transactions, especially payment requests in ether and ERC-20 tokens as URLs.

**TL;DR:** Defines ethereum: URLs for payment and transaction requests, so a QR code or link can open any wallet with the recipient, amount, token and chain already filled in.

## What problem does it solve?

Bitcoin's `bitcoin:` URLs made "scan to pay" easy: a shop shows a QR code, your wallet opens with the address and amount ready. Ethereum had no common format, so each wallet and point-of-sale app invented its own, or users copied addresses by hand.

ERC-681 standardizes an `ethereum:` URL that any wallet can parse. It covers plain ether payments, [ERC-20](/eip-20/) token payments and, more generally, calls to any contract function.

## How it works

The syntax:

```
ethereum:[pay-]<address>[@<chain_id>][/<function>][?<params>]
```

- **address**: a `0x` hex address or an ENS name ([ERC-137](/eip-137/)). Mandatory.
- **chain_id**: optional decimal chain ID. Without it, the wallet uses its current network.
- **function**: optional. If omitted, the URL asks for a native ether payment. If present, it names a contract function to call.
- **params**: `value`, `gasLimit` (or `gas`), `gasPrice`, or ABI type names such as `address=` and `uint256=` for function arguments.

Amounts are in the smallest unit (wei, or token base units) and may use scientific notation. `value=2.014e18` means 2.014 ETH. Only integers are allowed, so the exponent must cover all decimals.

All values are suggestions: the wallet shows them to the user, who may edit them before signing.

## Sample code

Example URLs:

```text
# Pay 2.014 ETH
ethereum:0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359?value=2.014e18

# Same, but only on chain 1 (mainnet)
ethereum:0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359@1?value=2.014e18

# ERC-20: call transfer(address,uint256) on the token contract
ethereum:<tokenAddress>/transfer?address=<recipient>&uint256=1e6
```

Building a token request in TypeScript (ethers v6):

```ts
import { getAddress, parseUnits } from "ethers";

function erc681Transfer(token: string, to: string, amount: string, decimals: number, chainId = 1) {
  const units = parseUnits(amount, decimals);          // e.g. "1.5", 6 -> 1500000n
  return `ethereum:${getAddress(token)}@${chainId}/transfer` +
         `?address=${getAddress(to)}&uint256=${units}`;
}
```

## Things to know

- For tokens, the URL targets the **token contract**, and the recipient goes in the `address` parameter. Mixing these up sends a request to the wrong place.
- Hex addresses always take precedence over ENS names. A wallet must never try to resolve something that looks like `0x` + 40 hex digits as ENS, which blocks a phishing trick.
- URLs can be tampered with in transit. Only trust payment links from authenticated sources, and show the amount clearly, ideally in token units using the contract's `decimals()`.
- Without `@chain_id`, the wallet uses whatever network it is on. Include the chain ID for anything outside mainnet so a payment is not sent on the wrong chain.
- ERC-681 supersedes the older ERC-67 format and stays compatible with it for the simple "address only" case. The `pay-` prefix is reserved so future incompatible versions can use a different prefix.


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-681
