<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="403" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[403]</anchor-end> <dfn><code class="HTTP"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">402</anchor></code></dfn> (<dfn><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Payment Required</anchor></dfn>)
は、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">課金</anchor>に関する制限により<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">要求</anchor>が処理されなかったことを示す<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">状態符号</anchor>です。</p><section><h1>仕様書</h1><refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="404" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[404]</anchor-end> <cite xml:lang="en">RFC 7231 - Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</cite> (<time>2014-08-07 05:54:02 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://tools.ietf.org/html/rfc7231#section-6.5.2">https://tools.ietf.org/html/rfc7231#section-6.5.2</anchor-external></li></ul></refs><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="405" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[405]</anchor-end> 歴代の <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">HTTP</anchor> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">仕様書</anchor>は <code class="HTTP"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">402</anchor></code> を<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">予約</anchor>しているだけで、
実質的な定義は存在していません。</p></section><section><h1>構文</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="407" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[407]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">応答</anchor>の <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">payload body</anchor> には、アクセス頻度や<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">課金</anchor>などに関するエラーであることを示す短い文章が含まれるのが普通です。</p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="408" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[408]</anchor-end> アクセス状況や<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">課金</anchor>の状態などを<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">機械可読</anchor>な形で提示したり、
自動的に支払いを行ったりするような仕組みは存在していません。</p></section><section><h1>文脈</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="406" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[406]</anchor-end> かつて <code class="HTTP"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">402</anchor></code> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">応答</anchor>は、 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Web API</anchor> に (<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">鯖</anchor>の判断基準による)
過剰なアクセスがあった場合にしばしば用いられていました。現在ではそうした場合は
<code class="HTTP"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">429</anchor></code> がより適切と考えられています。</p></section><section><h1>歴史</h1><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="4" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[4]</anchor-end> <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 2068</anchor>, <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 2616</anchor>, <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC 7231</anchor> のいずれも、 <code class="HTTP"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">402</anchor></code>
(<code class="HTTP"><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Payment Required</anchor></code>) は<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">理由句</anchor>が定義されているだけで、
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">状態符号</anchor>自体は予約 <src xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="2" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;2</anchor-internal>, <anchor-internal xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">&gt;&gt;3</anchor-internal></src> されていて、使われていません。</p><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="2" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[2]</anchor-end> RFC 2068 &amp; 2616 (HTTP/1.1) 10.4.3 402 Payment Required</figcaption><blockquote><p>This code is reserved for future use.</p></blockquote><p>この符号は将来の使用のために予約しています。</p></figure><refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[3]</anchor-end> <cite xml:lang="en">RFC 7231 - Hypertext Transfer Protocol (HTTP/1.1): Semantics and Content</cite> (<time>2014-08-07 05:54:02 +09:00</time> 版) <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://tools.ietf.org/html/rfc7231#section-6.5.2">https://tools.ietf.org/html/rfc7231#section-6.5.2</anchor-external></li></ul></refs><refs xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><ul xmlns="http://www.w3.org/1999/xhtml"><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="1" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[1]</anchor-end> <cite>法と技術とクローラと私 - 最速転職研究会</cite>
(<time>2010-07-08 07:47:20 +09:00</time> 版)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://d.hatena.ne.jp/mala/20100707/1278514965">http://d.hatena.ne.jp/mala/20100707/1278514965</anchor-external></li></ul></refs><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="409" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[409]</anchor-end> <cite xml:lang="en">RFC 2660 - The Secure HyperText Transfer Protocol</cite>
( (<time>2014-11-09 14:12:37 +09:00</time> 版))
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://tools.ietf.org/html/rfc2660#section-5.2.1">http://tools.ietf.org/html/rfc2660#section-5.2.1</anchor-external></p><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="5" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[5]</anchor-end> <cite xml:lang="en">REST API Reference - PayPal Developer</cite>
(<time>2015-07-02 12:54:14 +09:00</time> 版)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://developer.paypal.com/docs/api/">https://developer.paypal.com/docs/api/</anchor-external></figcaption><blockquote><p>402	- Failed request</p></blockquote></figure><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="6" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[6]</anchor-end> <cite xml:lang="en">Stripe API Reference</cite>
(<time>2015-08-29 17:37:34 +09:00</time> 版)
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://stripe.com/docs/api#errors">https://stripe.com/docs/api#errors</anchor-external></figcaption><blockquote><p>When a request is valid but does not complete successfully (e.g. a card is declined), we return a 402 error code.</p><p>402 - Request Failed	Parameters were valid but request failed.</p></blockquote></figure><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="7" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[7]</anchor-end> <cite>402 Payment Requiredが出た方へ</cite>
( (<time>2012-02-11 05:45:34 +09:00</time>))
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://s1.gptwm.com/402error.html">http://s1.gptwm.com/402error.html</anchor-external></figcaption><blockquote><p>本サイトは同時接続数制限2ですので、それを超えるとエラーが出るようにしています。</p></blockquote></figure><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="8" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[8]</anchor-end> <cite xml:lang="en">New HTTP Status Code (402 - Payment Required) - API Announcements — Ecommerce University</cite>
( (<time>2016-05-15 18:33:58 +09:00</time>))
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://ecommerce.shopify.com/c/api-announcements/t/new-http-status-code-402-payment-required-215030">https://ecommerce.shopify.com/c/api-announcements/t/new-http-status-code-402-payment-required-215030</anchor-external></figcaption><blockquote><p>I want to let you know the API will now respond with (402 - Payment Required) when a shop does not have access to a specific feature. Prior to this change the API would respond with (404 - Not Found).</p><p>In addition to this HTTP Status Code there will be an error included in the JSON response:</p><p>This shop's plan does not have access to this feature</p></blockquote></figure><figure class="quote"><figcaption><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="9" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[9]</anchor-end> <cite xml:lang="en">Google APIs - Global domain errors  |  YouTube Data API  |  Google Developers</cite>
( (<time>2015-05-21 03:44:24 +09:00</time>))
<anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://developers.google.com/youtube/v3/docs/core_errors#PAYMENT_REQUIRED">https://developers.google.com/youtube/v3/docs/core_errors#PAYMENT_REQUIRED</anchor-external></figcaption><blockquote><p>dailyLimitExceeded402	A daily budget limit set by the developer has been reached.</p><p>quotaExceeded402	The requested operation requires more resources than the quota allows. Payment is required to complete the operation.</p><p>user402	The requested operation requires some kind of payment from the authenticated user.</p></blockquote></figure><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="10" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[10]</anchor-end> 
<cite xml:lang="ja">XユーザーのCoinbase Developer Platform🛡️さん: 「First, a little history: HTTP 402 “Payment Required” has been a part of the internet’s blueprint for decades, but it was never used. x402 turns this 402 status code into a real payment layer—letting any server request payment, and any client (human or agent) respond with」 / X</cite>, <time>午前1:04 · 2025年5月7日<attrvalue xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:">2025-05-06T16:04:00.000Z</attrvalue></time>, <time>2025-05-08T02:48:50.000Z</time> <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://x.com/CoinbaseDev/status/1919785226936713369">https://x.com/CoinbaseDev/status/1919785226936713369</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="11" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[11]</anchor-end> <cite xml:lang="en">x402.org</cite>, <time>2025-05-08T03:02:38.000Z</time> <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://www.x402.org/">https://www.x402.org/</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="12" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[12]</anchor-end> 
<cite xml:lang="ja">x402: The Payment Protocol for Agentic Commerce - x402-whitepaper.pdf</cite>, <time>2025-05-08T01:20:16.000Z</time>, <time>2025-05-08T03:03:22.564Z</time> <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://www.x402.org/x402-whitepaper.pdf">https://www.x402.org/x402-whitepaper.pdf</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="13" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[13]</anchor-end> 
<cite xml:lang="en">GitHub - coinbase/x402: A payments protocol for the internet. Built on HTTP.</cite>, <time>2025-05-08T03:04:39.000Z</time> <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://github.com/coinbase/x402/">https://github.com/coinbase/x402/</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="14" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[14]</anchor-end> 
<cite xml:lang="en">Introducing x402: a new standard for internet-native payments | Coinbase</cite>, <time>2025-05-08T03:05:17.000Z</time> <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://www.coinbase.com/developer-platform/discover/launches/x402">https://www.coinbase.com/developer-platform/discover/launches/x402</anchor-external></p><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="15" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[15]</anchor-end> 
<cite xml:lang="en-us">Introducing pay per crawl: enabling content owners to charge AI crawlers for access</cite>, <time>2025-07-03T02:31:59.000Z</time> <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="https://blog.cloudflare.com/introducing-pay-per-crawl/">https://blog.cloudflare.com/introducing-pay-per-crawl/</anchor-external></p></section></body></html>