{"eip":7856,"title":"Chain-Specific Payment Requests","description":"A URI scheme for chain-specific payment requests.","authors":["Jack Chuma (@jackchuma)"],"status":"Draft","type":"Standards Track","category":"ERC","created":"2025-01-01","discussionsTo":"https://ethereum-magicians.org/t/add-erc-chain-specific-payment-requests/22379","repo":"ERCs","label":"ERC-7856","officialUrl":"https://eips.ethereum.org/EIPS/eip-7856","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7856.md","url":"https://eips.huatuo.xyz/eip-7856/","tldr":{"en":"A cspr:// URI scheme for payment requests that names the exact chain, recipient, token and amount, so \"send me X of token Y on chain Z\" cannot be fulfilled on the wrong network.","ja":"正確なチェーン、受取人、トークン、金額を指定する、支払いリクエスト用の cspr:// URI スキーム。「チェーン Z 上でトークン Y を X だけ送って」というリクエストが、誤ったネットワークで履行されることを防ぐ。","ko":"체인, 수취인, 토큰, 금액을 정확히 지정하는 결제 요청용 cspr:// URI 스킴. \"체인 Z에서 토큰 Y를 X만큼 보내 주세요\"라는 요청이 엉뚱한 네트워크에서 이행되는 일을 막는다.","zh":"一种用于支付请求的 cspr:// URI 方案，明确指定链、收款方、代币和金额，使\"在链 Z 上向我支付 X 个代币 Y\"的请求不会在错误的网络上被履行。"},"tags":["uri","payments","wallet","multichain","draft"],"explainers":{"en":{"lang":"en","tldr":"A cspr:// URI scheme for payment requests that names the exact chain, recipient, token and amount, so \"send me X of token Y on chain Z\" cannot be fulfilled on the wrong network.","tags":["uri","payments","wallet","multichain","draft"],"related":[681,831,20],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7856/","markdown":"## What problem does it solve?\n\nWith mainnet plus many L2s, \"send me 100 USDC\" is ambiguous: the same asset exists on many chains, often at different addresses. Payment links and QR codes need to say exactly which chain the payment belongs on, or users risk sending funds where the recipient cannot use them.\n\n[ERC-681](/eip-681/) already defines `ethereum:` payment URIs, but it is Ethereum-specific and includes many low-level transaction parameters. ERC-7856 proposes a small, chain-agnostic format focused on just the payment.\n\n## How it works\n\n```\ncspr://\u003crecipient\u003e/\u003camount\u003e/\u003ctoken-address\u003e?on-success=\u003curl\u003e\u0026on-error=\u003curl\u003e\n```\n\n- **`cspr://`**: \"Chain-Specific Payment Request\".\n- **`\u003crecipient\u003e`** (required): a CAIP-10 account ID such as `eip155:8453:0x…`, which encodes both the chain and the address. This is what makes the request chain-specific.\n- **`\u003camount\u003e`** (required): integer or decimal, in the token's human units.\n- **`\u003ctoken-address\u003e`** (required): the [ERC-20](/eip-20/) contract address, or the literal `native` for the chain's native currency.\n- **`on-success` / `on-error`** (optional): URLs to redirect the user to after the transaction confirms or fails.\n\nGas settings and other transaction details are deliberately left to the wallet. ENS names are not supported; CAIP-10 is used instead. Because CAIP-10 covers non-EVM chains, the same scheme can express, for example, a Bitcoin payment.\n\nWallets must validate the recipient format and show an error for anything malformed.\n\n## Sample code\n\nExamples from the spec:\n\n```txt\n# 1 ETH on Base (chain 8453), with a success callback\ncspr://eip155:8453:0x1111111111111111111111111111111111111111/1/native?on-success=https://example.com\n\n# 100 USDC on Ethereum mainnet\ncspr://eip155:1:0xab16a96D359eC26a11e2C2b3d8f8B8942d5Bfcdb/100/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\n```\n\nA minimal parser (TypeScript):\n\n```ts\nfunction parseCspr(uri: string) {\n  const u = new URL(uri.replace(/^cspr:\\/\\//, \"https://cspr.invalid/\"));\n  const [recipient, amount, token] = u.pathname.slice(1).split(\"/\").map(decodeURIComponent);\n  const [namespace, reference, address] = recipient.split(\":\"); // CAIP-10\n  if (!namespace || !reference || !address || !amount || !token) throw new Error(\"invalid cspr URI\");\n  return {\n    chain: `${namespace}:${reference}`,   // e.g. \"eip155:8453\"\n    address,\n    amount,                               // keep as string; convert with the token's decimals\n    token,                                // contract address or \"native\"\n    onSuccess: u.searchParams.get(\"on-success\"),\n    onError: u.searchParams.get(\"on-error\"),\n  };\n}\n```\n\n## Things to know\n\n- **Status: Draft.**\n- Not compatible with ERC-681 or [ERC-831](/eip-831/) URIs because of the different prefix.\n- The spec says the token address is \"represented as a base64 encoded string\", yet its examples use plain hex addresses; check the latest draft before relying on either reading.\n- Treat these URIs like any payment link: the recipient and amount can be tampered with, so wallets should show the amount clearly in token units, validate callback URLs against phishing, and refuse `native` on chains without a native currency.\n"},"ja":{"lang":"ja","tldr":"正確なチェーン、受取人、トークン、金額を指定する、支払いリクエスト用の cspr:// URI スキーム。「チェーン Z 上でトークン Y を X だけ送って」というリクエストが、誤ったネットワークで履行されることを防ぐ。","tags":["uri","payments","wallet","multichain","draft"],"related":[681,831,20],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7856/","markdown":"## 何を解決するのか\n\nメインネットと多数の L2 がある今、「100 USDC を送って」は曖昧です。同じ資産が多くのチェーンに存在し、しかもアドレスが異なることが多いからです。支払いリンクや QR コードは、支払いがどのチェーン上のものかを正確に示す必要があります。そうしないと、受取人が使えない場所に資金を送ってしまう恐れがあります。\n\n[ERC-681](/eip-681/) はすでに `ethereum:` 形式の支払い URI を定義していますが、Ethereum 専用で、低レベルなトランザクションパラメータを多く含みます。ERC-7856 は、支払いだけに絞った、小さくチェーンに依存しない形式を提案します。\n\n## 仕組み\n\n```\ncspr://\u003crecipient\u003e/\u003camount\u003e/\u003ctoken-address\u003e?on-success=\u003curl\u003e\u0026on-error=\u003curl\u003e\n```\n\n- **`cspr://`**: 「Chain-Specific Payment Request」。\n- **`\u003crecipient\u003e`**（必須）: `eip155:8453:0x…` のような CAIP-10 アカウント ID。チェーンとアドレスの両方をエンコードします。これがリクエストをチェーン固有にしています。\n- **`\u003camount\u003e`**（必須）: 整数または小数。トークンの人間向けの単位で表します。\n- **`\u003ctoken-address\u003e`**（必須）: [ERC-20](/eip-20/) のコントラクトアドレス、またはそのチェーンのネイティブ通貨を表すリテラルの `native`。\n- **`on-success` / `on-error`**（任意）: トランザクションの確定後または失敗後に、ユーザーをリダイレクトする URL。\n\nガスの設定やその他のトランザクションの詳細は、意図的にウォレットに任されています。ENS 名には対応しておらず、代わりに CAIP-10 を使います。CAIP-10 は EVM 以外のチェーンもカバーするため、同じスキームで、たとえば Bitcoin の支払いも表現できます。\n\nウォレットは受取人の形式を検証し、不正な形式のものにはエラーを表示しなければなりません。\n\n## サンプルコード\n\n仕様の例:\n\n```txt\n# 1 ETH on Base (chain 8453), with a success callback\ncspr://eip155:8453:0x1111111111111111111111111111111111111111/1/native?on-success=https://example.com\n\n# 100 USDC on Ethereum mainnet\ncspr://eip155:1:0xab16a96D359eC26a11e2C2b3d8f8B8942d5Bfcdb/100/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\n```\n\n最小限のパーサー（TypeScript）:\n\n```ts\nfunction parseCspr(uri: string) {\n  const u = new URL(uri.replace(/^cspr:\\/\\//, \"https://cspr.invalid/\"));\n  const [recipient, amount, token] = u.pathname.slice(1).split(\"/\").map(decodeURIComponent);\n  const [namespace, reference, address] = recipient.split(\":\"); // CAIP-10\n  if (!namespace || !reference || !address || !amount || !token) throw new Error(\"invalid cspr URI\");\n  return {\n    chain: `${namespace}:${reference}`,   // e.g. \"eip155:8453\"\n    address,\n    amount,                               // keep as string; convert with the token's decimals\n    token,                                // contract address or \"native\"\n    onSuccess: u.searchParams.get(\"on-success\"),\n    onError: u.searchParams.get(\"on-error\"),\n  };\n}\n```\n\n## 知っておくべきこと\n\n- **ステータス: Draft。**\n- プレフィックスが異なるため、ERC-681 や [ERC-831](/eip-831/) の URI とは互換性がありません。\n- 仕様はトークンアドレスが「base64 エンコードされた文字列として表される」と述べていますが、例ではふつうの 16 進アドレスを使っています。どちらの読み方に頼る前にも、最新のドラフトを確認してください。\n- これらの URI は、あらゆる支払いリンクと同じように扱ってください。受取人と金額は改ざんされうるため、ウォレットは金額をトークン単位ではっきり表示し、コールバック URL をフィッシングに対して検証し、ネイティブ通貨を持たないチェーンでの `native` は拒否すべきです。\n"},"ko":{"lang":"ko","tldr":"체인, 수취인, 토큰, 금액을 정확히 지정하는 결제 요청용 cspr:// URI 스킴. \"체인 Z에서 토큰 Y를 X만큼 보내 주세요\"라는 요청이 엉뚱한 네트워크에서 이행되는 일을 막는다.","tags":["uri","payments","wallet","multichain","draft"],"related":[681,831,20],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7856/","markdown":"## 어떤 문제를 해결하나요?\n\n메인넷과 수많은 L2가 있는 지금, \"100 USDC 보내 주세요\"는 모호합니다. 같은 자산이 많은 체인에 존재하고, 주소도 서로 다른 경우가 많기 때문입니다. 결제 링크와 QR 코드는 결제가 어느 체인에 속하는지 정확히 알려 줘야 합니다. 그렇지 않으면 사용자가 수취인이 쓸 수 없는 곳으로 자금을 보낼 위험이 있습니다.\n\n[ERC-681](/eip-681/)은 이미 `ethereum:` 결제 URI를 정의하지만 이더리움 전용이고 저수준 트랜잭션 파라미터를 많이 포함합니다. ERC-7856은 결제 자체에만 집중한 작고 체인에 구애받지 않는 형식을 제안합니다.\n\n## 어떻게 동작하나요?\n\n```\ncspr://\u003crecipient\u003e/\u003camount\u003e/\u003ctoken-address\u003e?on-success=\u003curl\u003e\u0026on-error=\u003curl\u003e\n```\n\n- **`cspr://`**: \"Chain-Specific Payment Request\"(체인 특정 결제 요청).\n- **`\u003crecipient\u003e`**(필수): `eip155:8453:0x…` 같은 CAIP-10 계정 ID로, 체인과 주소를 모두 인코딩합니다. 이것이 요청을 체인 특정적으로 만듭니다.\n- **`\u003camount\u003e`**(필수): 정수 또는 소수이며, 토큰의 사람이 읽는 단위입니다.\n- **`\u003ctoken-address\u003e`**(필수): [ERC-20](/eip-20/) 컨트랙트 주소, 또는 해당 체인의 기본 통화를 뜻하는 리터럴 `native`.\n- **`on-success` / `on-error`**(선택): 트랜잭션이 확정되거나 실패한 뒤 사용자를 리디렉션할 URL.\n\n가스 설정과 기타 트랜잭션 세부 사항은 의도적으로 지갑에 맡깁니다. ENS 이름은 지원하지 않으며 대신 CAIP-10을 사용합니다. CAIP-10은 EVM이 아닌 체인도 다루므로, 같은 스킴으로 예를 들어 비트코인 결제도 표현할 수 있습니다.\n\n지갑은 수취인 형식을 검증해야 하며, 형식이 잘못된 것에는 오류를 표시해야 합니다.\n\n## 샘플 코드\n\n명세의 예시:\n\n```txt\n# 1 ETH on Base (chain 8453), with a success callback\ncspr://eip155:8453:0x1111111111111111111111111111111111111111/1/native?on-success=https://example.com\n\n# 100 USDC on Ethereum mainnet\ncspr://eip155:1:0xab16a96D359eC26a11e2C2b3d8f8B8942d5Bfcdb/100/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\n```\n\n최소한의 파서(TypeScript):\n\n```ts\nfunction parseCspr(uri: string) {\n  const u = new URL(uri.replace(/^cspr:\\/\\//, \"https://cspr.invalid/\"));\n  const [recipient, amount, token] = u.pathname.slice(1).split(\"/\").map(decodeURIComponent);\n  const [namespace, reference, address] = recipient.split(\":\"); // CAIP-10\n  if (!namespace || !reference || !address || !amount || !token) throw new Error(\"invalid cspr URI\");\n  return {\n    chain: `${namespace}:${reference}`,   // e.g. \"eip155:8453\"\n    address,\n    amount,                               // keep as string; convert with the token's decimals\n    token,                                // contract address or \"native\"\n    onSuccess: u.searchParams.get(\"on-success\"),\n    onError: u.searchParams.get(\"on-error\"),\n  };\n}\n```\n\n## 알아둘 점\n\n- **상태: Draft.**\n- 접두사가 달라서 ERC-681이나 [ERC-831](/eip-831/) URI와는 호환되지 않습니다.\n- 명세는 토큰 주소가 \"base64로 인코딩된 문자열로 표현된다\"고 하지만 예시에서는 일반 16진수 주소를 사용합니다. 어느 쪽 해석에 의존하기 전에 최신 초안을 확인하세요.\n- 이 URI들은 다른 결제 링크와 똑같이 취급하세요. 수취인과 금액은 변조될 수 있으므로 지갑은 금액을 토큰 단위로 분명히 보여 주고, 콜백 URL을 피싱에 대비해 검증하며, 기본 통화가 없는 체인에서 `native`는 거부해야 합니다.\n"},"zh":{"lang":"zh","tldr":"一种用于支付请求的 cspr:// URI 方案，明确指定链、收款方、代币和金额，使\"在链 Z 上向我支付 X 个代币 Y\"的请求不会在错误的网络上被履行。","tags":["uri","payments","wallet","multichain","draft"],"related":[681,831,20],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7856/","markdown":"## 它解决什么问题？\n\n有了主网和众多 L2，\"向我转 100 USDC\"就变得含糊不清：同一种资产存在于许多链上，地址往往还不一样。支付链接和二维码需要明确说明这笔付款属于哪条链，否则用户可能会把资金发到收款方无法使用的地方。\n\n[ERC-681](/eip-681/) 已经定义了 `ethereum:` 支付 URI，但它是以太坊专用的，并包含许多底层交易参数。ERC-7856 提出了一种小巧的、与链无关的格式，只聚焦于支付本身。\n\n## 它如何运作\n\n```\ncspr://\u003crecipient\u003e/\u003camount\u003e/\u003ctoken-address\u003e?on-success=\u003curl\u003e\u0026on-error=\u003curl\u003e\n```\n\n- **`cspr://`**：\"Chain-Specific Payment Request\"（特定链的支付请求）。\n- **`\u003crecipient\u003e`**（必填）：CAIP-10 账户 ID，例如 `eip155:8453:0x…`，同时编码了链和地址。这正是让请求变成链专属的原因。\n- **`\u003camount\u003e`**（必填）：整数或小数，以代币的人类可读单位表示。\n- **`\u003ctoken-address\u003e`**（必填）：[ERC-20](/eip-20/) 合约地址，或者字面量 `native` 表示该链的原生货币。\n- **`on-success` / `on-error`**（可选）：交易确认或失败后，把用户重定向到的 URL。\n\nGas 设置和其他交易细节被刻意留给钱包处理。不支持 ENS 名称；改用 CAIP-10。由于 CAIP-10 涵盖非 EVM 链，同一方案也可以表达例如比特币的支付。\n\n钱包必须验证收款方格式，并对任何格式错误的内容显示错误。\n\n## 示例代码\n\n规范中的示例：\n\n```txt\n# 1 ETH on Base (chain 8453), with a success callback\ncspr://eip155:8453:0x1111111111111111111111111111111111111111/1/native?on-success=https://example.com\n\n# 100 USDC on Ethereum mainnet\ncspr://eip155:1:0xab16a96D359eC26a11e2C2b3d8f8B8942d5Bfcdb/100/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\n```\n\n一个最小的解析器（TypeScript）：\n\n```ts\nfunction parseCspr(uri: string) {\n  const u = new URL(uri.replace(/^cspr:\\/\\//, \"https://cspr.invalid/\"));\n  const [recipient, amount, token] = u.pathname.slice(1).split(\"/\").map(decodeURIComponent);\n  const [namespace, reference, address] = recipient.split(\":\"); // CAIP-10\n  if (!namespace || !reference || !address || !amount || !token) throw new Error(\"invalid cspr URI\");\n  return {\n    chain: `${namespace}:${reference}`,   // e.g. \"eip155:8453\"\n    address,\n    amount,                               // keep as string; convert with the token's decimals\n    token,                                // contract address or \"native\"\n    onSuccess: u.searchParams.get(\"on-success\"),\n    onError: u.searchParams.get(\"on-error\"),\n  };\n}\n```\n\n## 需要注意\n\n- **状态：Draft。**\n- 由于前缀不同，与 ERC-681 或 [ERC-831](/eip-831/) 的 URI 不兼容。\n- 规范说代币地址\"以 base64 编码字符串表示\"，但它的示例使用的是普通十六进制地址；在依赖任何一种解读之前，请查看最新草案。\n- 请像对待任何支付链接一样对待这些 URI：收款方和金额都可能被篡改，所以钱包应以代币单位清晰显示金额，针对钓鱼验证回调 URL，并在没有原生货币的链上拒绝 `native`。\n"}}}
