🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@scriptmasterlabs/x402-paywall

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@scriptmasterlabs/x402-paywall

One-line x402 paywall: app.use('/premium', x402({ price: '0.001', payTo: '0x...' })). Agents pay USDC on Base. Humans optional free.

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
14
-84.44%
Maintainers
1
Weekly downloads
 
Created
Source

@scriptmasterlabs/x402-paywall

One line of code. AI agents pay. No Stripe. No API keys. No accounts.

import { x402 } from '@scriptmasterlabs/x402-paywall'

app.use('/premium', x402({
  price: '0.001',
  payTo: '0xYourBaseAddress',
  freeForHumans: true, // bots/agents pay; browsers free
}))

Install

npm i @scriptmasterlabs/x402-paywall

What happens

  • Agent hits your route → HTTP 402 + machine-readable accepts[]
  • Agent sends 0.001 USDC on Base to payTo
  • Agent retries with header: X-PAYMENT-TX: 0x<txHash>
  • Middleware verifies the on-chain USDC transfer → your handler runs

CRAWLTOLL mode

freeForHumans: true → Chrome/Safari free; GPTBot/ClaudeBot/curl/mcp pay.

Live $0.001 snacks (already deployed)

See: https://www.scriptmasterlabs.com/x402-snacks.html

Keywords

x402

FAQs

Package last updated on 26 Jul 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts