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.
التثبيت باستخدام Agent لدي
انسخ هذا الطلب إلى Agent لديك. يتضمن صفحة Skill المعتمدة وملف manifest.
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.يجب أن يواصل Agent عرض خطته وطلب أي تأكيد تفرضه سياسة الأمان.
موارد مهيّأة لـ Agents
استخدم هذه الروابط عندما يحتاج AI Agent أو crawler أو script إلى سياق نظيف بدلًا من قراءة الصفحة كاملة.
اختبرها
جارٍ استخدام "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 الأدلة من دون أن تقرر ما إذا كانت هذه المهارة آمنة.
نسخ رابط التقرير
https://skillstore.io/skills/nexaiguy-x402-api-paywall/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportشارة Markdown
[](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/1اقتباس BibTeX
@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.