<?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>Forem: ankitx1357-boop</title>
    <description>The latest articles on Forem by ankitx1357-boop (@ankitx1357boop).</description>
    <link>https://forem.com/ankitx1357boop</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3624564%2Fbfa38769-cbc3-46e3-9c5a-432e9207386c.png</url>
      <title>Forem: ankitx1357-boop</title>
      <link>https://forem.com/ankitx1357boop</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ankitx1357boop"/>
    <language>en</language>
    <item>
      <title>Stop Blocking AI Bots. Charge Them. (I built a Payment Protocol in Node.js)</title>
      <dc:creator>ankitx1357-boop</dc:creator>
      <pubDate>Sun, 23 Nov 2025 05:35:33 +0000</pubDate>
      <link>https://forem.com/ankitx1357boop/stop-blocking-ai-bots-charge-them-i-built-a-payment-protocol-in-nodejs-lhc</link>
      <guid>https://forem.com/ankitx1357boop/stop-blocking-ai-bots-charge-them-i-built-a-payment-protocol-in-nodejs-lhc</guid>
      <description>&lt;h1&gt;
  
  
  javascript #node #showdev #ai                                                ## The Problem
&lt;/h1&gt;

&lt;p&gt;Everyone is scrambling to block AI scrapers (GPT-5, Claude, Gemini) from reading their data. They are using CAPTCHAs, firewalls, and &lt;code&gt;robots.txt&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;I realized this is a losing battle. Instead of blocking them, why not &lt;strong&gt;tax&lt;/strong&gt; them?&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution: Tollgate
&lt;/h2&gt;

&lt;p&gt;I spent the last 24 hours building &lt;strong&gt;Tollgate&lt;/strong&gt;—a sovereign middleware for the Agentic Web.&lt;/p&gt;

&lt;p&gt;Instead of a 403 Forbidden, my server returns a &lt;strong&gt;402 Payment Required&lt;/strong&gt;.&lt;br&gt;
If the Agent pays the toll (via a micro-transaction), they get a JWT and access to clean, structured JSON data.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Architecture
&lt;/h2&gt;

&lt;p&gt;I deployed the live node on &lt;strong&gt;Render&lt;/strong&gt; to test the theory.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Backend:&lt;/strong&gt; Node.js + Express&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auth:&lt;/strong&gt; JSON Web Tokens (JWT)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Asset:&lt;/strong&gt; Real-time Bitcoin Price Oracle (via CoinDesk API)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pricing:&lt;/strong&gt; Hardcoded at $1.00 per request.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;[Image of API Gateway architecture flow]&lt;/p&gt;

&lt;h2&gt;
  
  
  The Code
&lt;/h2&gt;

&lt;p&gt;Here is the client-side script I wrote to verify the transaction. It pays the bank, gets the token, and unlocks the vault automatically:&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
javascript
// verify.js - The Client
const axios = require('axios');
const BASE_URL = "[https://tollgate-live-1.onrender.com](https://tollgate-live-1.onrender.com)"; 

async function verifyTheGold() {
    // 1. Pay $1.00
    const payResponse = await axios.post(`${BASE_URL}/pay`, {
        agent_id: "DevTo-Reader",
        amount: 1.00
    });
    const token = payResponse.data.access_token;

    // 2. Access Data
    const dataResponse = await axios.get(`${BASE_URL}/premium-data`, {
        headers: { 'Authorization': token }
    });

    console.log("💰 BTC Price:", dataResponse.data.price);
}                                                                                     Try the Live Demo
You can hit the API right now. It's running 24/7 on the cloud.

👉 Live Node: https://tollgate-live-1.onrender.com

I'm an 18-year-old developer looking for feedback on this architecture. Does the Agentic Web need a native currency layer? Let me know in the comments.


### **Step 3: Publish**
Hit the **Publish** button.

**Crucial Last Step:**
Once it is live, **copy the link to your post and paste it here.**
I want to confirm it looks good. Go! 🚀
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>javascript</category>
      <category>ai</category>
      <category>node</category>
      <category>showdev</category>
    </item>
    <item>
      <title>How I built a Sovereign Payment Node for AI Agents in 24 Hours</title>
      <dc:creator>ankitx1357-boop</dc:creator>
      <pubDate>Sun, 23 Nov 2025 05:31:26 +0000</pubDate>
      <link>https://forem.com/ankitx1357boop/how-i-built-a-sovereign-payment-node-for-ai-agents-in-24-hours-29cn</link>
      <guid>https://forem.com/ankitx1357boop/how-i-built-a-sovereign-payment-node-for-ai-agents-in-24-hours-29cn</guid>
      <description>&lt;p&gt;Everyone is trying to block AI scrapers. I decided to tax them. I built Tollgate, a Node.js middleware that forces AI Agents to pay $1.00 USD to access premium data. The Stack:&lt;/p&gt;

&lt;p&gt;Node.js &amp;amp; Express&lt;/p&gt;

&lt;p&gt;JWT for authentication&lt;/p&gt;

&lt;p&gt;CoinDesk API for data&lt;/p&gt;

&lt;p&gt;Render for hosting   const axios = require('axios');&lt;/p&gt;

&lt;p&gt;// 🔴 PASTE YOUR RENDER URL HERE (No slash at the end)&lt;br&gt;
const BASE_URL = "&lt;a href="https://tollgate-live-1.onrender.com" rel="noopener noreferrer"&gt;https://tollgate-live-1.onrender.com&lt;/a&gt;"; &lt;/p&gt;

&lt;p&gt;async function verifyTheGold() {&lt;br&gt;
    console.log(&lt;code&gt;🎯 Target: ${"https://tollgate-live-1.onrender.com"}&lt;/code&gt;);&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;try {
    // STEP 1: Pay $1.00
    console.log("1. 💸 Sending $1.00 Premium Payment...");

    const payResponse = await axios.post(`${BASE_URL}/pay`, {
        agent_id: "Big-Spender-Bot",
        amount: 1.00  // &amp;lt;--- UPDATED PRICE
    });

    const token = payResponse.data.access_token;
    console.log("   ✅ Payment Accepted! Token received.");

    // STEP 2: Get Data
    console.log("2. 🔓 Accessing Premium Vault...");

    const goldResponse = await axios.get(`${BASE_URL}/premium-data`, {
        headers: { 'Authorization': token }
    });

    // STEP 3: Result
    console.log("\n   🎉 SUCCESS! DATA RECEIVED:");
    console.log("   ========================================");
    console.log("   ITEM:  " + goldResponse.data.item);
    console.log("   PRICE: " + goldResponse.data.price);
    console.log("   ========================================");

} catch (error) {
    console.error("\n❌ FAILED.");
    if (error.response) {
         console.error("   Server Message:", error.response.data);
    } else {
         console.error("   Error:", error.message);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;verifyTheGold();                                                                   Live Demo: You can try hitting the API here: &lt;a href="https://tollgate-live-1.onrender.com" rel="noopener noreferrer"&gt;https://tollgate-live-1.onrender.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let me know what you think of this architecture!&lt;/p&gt;

&lt;p&gt;Tags: #javascript, #showdev, #ai, #node.&lt;/p&gt;

</description>
      <category>agents</category>
      <category>api</category>
      <category>ai</category>
      <category>node</category>
    </item>
    <item>
      <title>How I built a Sovereign AI Payment Node using Node.js &amp; Render.</title>
      <dc:creator>ankitx1357-boop</dc:creator>
      <pubDate>Sat, 22 Nov 2025 15:53:03 +0000</pubDate>
      <link>https://forem.com/ankitx1357boop/how-i-built-a-sovereign-ai-payment-node-using-nodejs-render-194o</link>
      <guid>https://forem.com/ankitx1357boop/how-i-built-a-sovereign-ai-payment-node-using-nodejs-render-194o</guid>
      <description>&lt;p&gt;const axios = require('axios');&lt;/p&gt;

&lt;p&gt;// 🔴 PASTE YOUR RENDER URL HERE (No slash at the end)&lt;br&gt;
const BASE_URL = "&lt;a href="https://tollgate-live-1.onrender.com" rel="noopener noreferrer"&gt;https://tollgate-live-1.onrender.com&lt;/a&gt;"; &lt;/p&gt;

&lt;p&gt;async function verifyTheGold() {&lt;br&gt;
    console.log(&lt;code&gt;🎯 Target: ${"https://tollgate-live-1.onrender.com"}&lt;/code&gt;);&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;try {
    // STEP 1: Pay $1.00
    console.log("1. 💸 Sending $1.00 Premium Payment...");

    const payResponse = await axios.post(`${BASE_URL}/pay`, {
        agent_id: "Big-Spender-Bot",
        amount: 1.00  // &amp;lt;--- UPDATED PRICE
    });

    const token = payResponse.data.access_token;
    console.log("   ✅ Payment Accepted! Token received.");

    // STEP 2: Get Data
    console.log("2. 🔓 Accessing Premium Vault...");

    const goldResponse = await axios.get(`${BASE_URL}/premium-data`, {
        headers: { 'Authorization': token }
    });

    // STEP 3: Result
    console.log("\n   🎉 SUCCESS! DATA RECEIVED:");
    console.log("   ========================================");
    console.log("   ITEM:  " + goldResponse.data.item);
    console.log("   PRICE: " + goldResponse.data.price);
    console.log("   ========================================");

} catch (error) {
    console.error("\n❌ FAILED.");
    if (error.response) {
         console.error("   Server Message:", error.response.data);
    } else {
         console.error("   Error:", error.message);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;}&lt;/p&gt;

&lt;p&gt;verifyTheGold();  "Most people block bots. I decided to tax them."             #javascript, #webdev, #showdev, #ai.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
