<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: get402.net</title>
    <description>The latest articles on DEV Community by get402.net (@get402).</description>
    <link>https://dev.to/get402</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3996815%2F9f8228e5-d65c-4fd0-9395-203e42c5f8dc.png</url>
      <title>DEV Community: get402.net</title>
      <link>https://dev.to/get402</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/get402"/>
    <language>en</language>
    <item>
      <title>HTTP 402 Is Back</title>
      <dc:creator>get402.net</dc:creator>
      <pubDate>Mon, 22 Jun 2026 11:20:43 +0000</pubDate>
      <link>https://dev.to/get402/http-402-is-back-18ga</link>
      <guid>https://dev.to/get402/http-402-is-back-18ga</guid>
      <description>&lt;p&gt;9|&lt;br&gt;
    10|# HTTP 402 Is Back: How get402 Revives the Payment Required Status Code&lt;br&gt;
    11|&lt;br&gt;
    12|For decades, HTTP 402 "Payment Required" sat dormant in the HTTP specification — a reserved status code with no standardized implementation. While every other 4xx status code found its purpose, 402 remained a ghost in the machine, waiting for the right moment.&lt;br&gt;
    13|&lt;br&gt;
    14|That moment is now.&lt;br&gt;
    15|&lt;br&gt;
    16|## What is HTTP 402?&lt;br&gt;
    17|&lt;br&gt;
    18|HTTP 402 (Payment Required) is a status code defined in &lt;a href="https://tools.ietf.org/html/rfc7231" rel="noopener noreferrer"&gt;RFC 7231&lt;/a&gt; but originally reserved since HTTP/1.0. Unlike 401 (Unauthorized) or 403 (Forbidden), 402 specifically indicates that the server cannot process the request because the client has not paid.&lt;br&gt;
    19|&lt;br&gt;
    20|&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;    21|&lt;/span&gt;&lt;span class="k"&gt;HTTP&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="m"&gt;1.1&lt;/span&gt; &lt;span class="m"&gt;402&lt;/span&gt; &lt;span class="ne"&gt;Payment Required&lt;/span&gt;
&lt;span class="s"&gt;    22|Content-Type: application/json&lt;/span&gt;
&lt;span class="s"&gt;    23|&lt;/span&gt;
&lt;span class="s"&gt;    24|{&lt;/span&gt;
&lt;span class="s"&gt;    25|  "error": "payment_required",&lt;/span&gt;
&lt;span class="s"&gt;    26|  "message": "This endpoint requires a payment of 0.01 USDC",&lt;/span&gt;
&lt;span class="s"&gt;    27|  "amount": "0.01",&lt;/span&gt;
&lt;span class="s"&gt;    28|  "currency": "USDC",&lt;/span&gt;
&lt;span class="s"&gt;    29|  "network": "base"&lt;/span&gt;
&lt;span class="s"&gt;    30|}&lt;/span&gt;
&lt;span class="s"&gt;    31|```&lt;/span&gt;
&lt;span class="s"&gt;&lt;/span&gt;

    32|
    33|## The get402 Implementation
    34|
    35|[get402](https://get402.net) is the first production-ready implementation of HTTP 402. Here's how it works:
    36|
    37|1. **Developer registers an API endpoint** with get402 and sets a price per request
    38|2. **Client calls the endpoint** — if they haven't paid, they receive a 402 response
    39|3. **Client pays** the required amount in USDC on Base
    40|4. **get402 verifies the transaction** and allows the request through
    41|5. **Developer gets paid** — automatically, every time
    42|
    43|API providers keep **99%** of revenue — get402 takes only **1%**.
    44|
    45|## Why Now?
    46|
    47|Three factors make 2026 the year of HTTP 402:
    48|
    49|1. **Stablecoins are mature** — USDC on Base offers fast, cheap settlements (~$0.001 per transaction)
    50|2. **Developers want fair monetization** — pay-per-call is more equitable than flat subscriptions
    51|3. **The web needs new business models** — AI APIs, premium data feeds, and serverless functions all benefit from granular billing
    52|
    53|## Getting Started
    54|
    55|Ready to implement HTTP 402 in your API? Head to [get402.net](https://get402.net) or check out our [dashboard](https://dashboard.get402.net). Install the SDK:
    56|
    57|

```bash
    58|npm install @get402/sdk
    59|```


    60|
    61|Then protect any endpoint with one line:
    62|
    63|

```typescript
    64|import { get402 } from '@get402/sdk';
    65|
    66|app.get('/api/premium-data', get402.protect('0.01'), handler);
    67|```


    68|
    69|HTTP 402 is no longer just a reserved status code — it's a business model.
    70|
    71|---
    72|
    73|*Built on Base. Powered by USDC. Available now at [get402.net](https://get402.net).*
    74|
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>api</category>
      <category>web3</category>
      <category>tutorial</category>
      <category>blockchain</category>
    </item>
  </channel>
</rss>
