x402-api-paywall
Add x402 Paywalls to API Routes
Charging agents per API request requires payment checks before protected work runs. This guide outlines x402 integration for FastAPI and Express using stablecoins and external verification.
自分のエージェントでインストール
このリクエストをエージェントにコピーしてください。正規の Skill ページとマニフェストが含まれています。
Review the Skillstore skill "x402-api-paywall" from https://skillstore.io/skills/nexaiguy-x402-api-paywall.md and its manifest at https://skillstore.io/api/skills/nexaiguy-x402-api-paywall/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.エージェントは引き続き計画を提示し、セキュリティポリシーで必要な確認を求める必要があります。
エージェントが読めるリソース
AI エージェント、クローラー、スクリプトがページ全体ではなく整理されたコンテキストを必要とする場合は、これらのリンクを使ってください。
テストする
「x402-api-paywall」を使用しています。 Plan a 0.10 USDC paywall for a FastAPI image-generation endpoint on Base Sepolia.
期待される結果:
- Attach a payment dependency only to the selected image-generation route.
- Return HTTP 402 with payment requirements when payment proof is absent.
- Verify payment through a compatible facilitator before running generation.
- Confirm recipient, asset, network, and price configuration before testing.
「x402-api-paywall」を使用しています。 Describe how to add paid routes to an Express API without changing public routes.
期待される結果:
- Mount payment middleware on selected paid routes rather than globally.
- Validate payment proof before invoking protected handlers.
- Leave public routes outside the payment middleware.
- Test missing and invalid proofs; verify live behavior separately from mocked tests.
セキュリティ監査
安全All five static findings are false positives: attribution links and payment-verification descriptions do not demonstrate reconnaissance or exfiltration. No evidence found of prompt injection or malicious instructions in the single documentation file. The package contains guidance only, so payment implementation security cannot be verified.
リスク要因
🌐 ネットワークアクセス (2)
このレポートを共有・引用
バージョン付き評価レポート、中立的なバッジ、埋め込みカード、引用を共有できます。Skillstore は証拠を報告しますが、この Skill が安全かどうかは判断しません。
レポートリンクをコピー
https://skillstore.io/skills/nexaiguy-x402-api-paywall/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdownバッジ
[](https://skillstore.io/skills/nexaiguy-x402-api-paywall?utm_source=security_passport_badge)HTMLバッジ
<a href="https://skillstore.io/skills/nexaiguy-x402-api-paywall?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/nexaiguy-x402-api-paywall/security.svg" alt="Skillstore security assessment" loading="lazy"></a>埋め込みカード
<iframe src="https://skillstore.io/embed/skills/nexaiguy-x402-api-paywall.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>学術引用 (APA · BibTeX · CFF)
APA形式の引用
nexaiguy. (2026). x402-api-paywall security audit report (audit version 1) [Author version 1.2]. Skillstore. https://skillstore.io/skills/nexaiguy-x402-api-paywall/audits/1BibTeX形式の引用
@techreport{nexaiguy-nexaiguy-x402-api-paywall-2026,
author = {nexaiguy},
title = {x402-api-paywall security audit report (audit version 1)},
institution = {Skillstore},
year = {2026},
number = {1},
url = {https://skillstore.io/skills/nexaiguy-x402-api-paywall/audits/1},
note = {Author version 1.2}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "x402-api-paywall security audit report (audit version 1)"
version: "1.2"
type: report
authors:
- name: "nexaiguy"
date-released: "2026-11-02"
url: "https://skillstore.io/skills/nexaiguy-x402-api-paywall/audits/1"
identifiers:
- type: other
value: "skillstore:nexaiguy-x402-api-paywall:audit:1"
description: "Skillstore immutable audit report identifier"
Skillstore スコア
このスコアの理由 証拠の信頼度: 中作成できるもの
Protect an expensive generation route
Use the guide to plan a FastAPI dependency that checks payment before an image-generation endpoint performs expensive work.
Introduce selective API billing
Plan Express middleware for paid endpoints while keeping public routes unchanged.
Prototype agent micropayments
Explore a test-network USDC payment flow for agents consuming metered services.
これらのプロンプトを試す
Explain the x402 request flow for a FastAPI route, including missing proof, HTTP 402 requirements, and facilitator verification.
Plan an x402 paywall for my FastAPI image-generation route at 0.10 USDC on Base Sepolia. Identify required configuration and keep public routes unchanged.
Review my Express routes and propose x402 middleware for selected paid endpoints. Identify a compatible facilitator and verify payment before protected work starts.
Review my x402 integration for proof replay, incorrect payment amounts, network mismatches, and facilitator outages. Propose failure tests and identify unverified settlement assumptions.
ベストプラクティス
- Verify current x402 and facilitator documentation before choosing dependencies or implementing payment checks.
- Validate payment before protected work and confirm recipient, asset, amount, and network.
- Test unpaid, invalid, and successful requests on a test network before enabling production payments.
回避
- Treating this public guide as bundled, audited payment middleware.
- Trusting client payment claims without server-side verification.
- Assuming mocked proofs demonstrate successful live payment settlement.