nevermined-payments
Integrates Nevermined payment infrastructure into AI agents, MCP servers, Google A2A agents, and REST APIs. Handles x402 protocol, credit billing, payment plans, and SDK integration for TypeScript (@nevermined-io/payments) and Python (payments-py).
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/aaitor/nevermined-paymentsWhat This Skill Does
The nevermined-payments skill provides a robust financial infrastructure for AI agents to monetize their services, enforce access control, and manage per-request billing. By implementing the x402 payment protocol, this skill transforms standard API endpoints and AI tools into revenue-generating assets. It enables agents to automatically request payment via HTTP 402 status codes, verify payment proofs, and handle credit-based billing cycles. This integration allows developers to support diverse billing structures, from one-off request purchases to subscription-based plans, seamlessly within TypeScript and Python environments like Express.js and FastAPI.
Installation
To integrate this skill into your environment, use the OpenClaw command line interface:
- Install via CLI:
clawhub install openclaw/skills/skills/aaitor/nevermined-payments - Configure your environment: Add
NVM_API_KEY,NVM_ENVIRONMENT(sandbox/live), andNVM_PLAN_IDto your project's.envfile. - SDK Integration: Install the official SDK corresponding to your stack. For Node.js, use
npm install @nevermined-io/payments. For Python, usepip install payments-py. - Initialize the client: Use the provided boilerplate to initialize the
Paymentsinstance within your server middleware to start intercepting requests.
Use Cases
- Monetizing Private Tools: Protect internal AI tools or scraping utilities by requiring users to pay for each individual task execution.
- Agent-to-Agent Payments: Facilitate secure, automated micro-transactions between disparate AI agents using the Google A2A protocol.
- SaaS API Gateways: Build subscription-based access layers for AI models, where users must have an active payment plan to reach protected endpoints.
- Metered Billing: Charge users specifically for the compute or tokens consumed during an agent's task execution, rather than flat monthly fees.
Example Prompts
- "Can you help me set up the nevermined-payments middleware in my FastAPI app so that my tool '/generate-report' requires a payment to access?"
- "How do I configure my environment variables to switch from sandbox testing to the live Nevermined production environment for my agent?"
- "Please explain how an MCP server should handle the 402 payment required response when it detects an unauthorized request to my payment-gated tool."
Tips & Limitations
- Always start in Sandbox: Never skip testing in the sandbox environment; the billing flows involve real-time interactions with blockchain-based credit ledgers that cannot be reversed.
- Middleware Order: Ensure that the payments middleware is placed before your actual logic execution in the request pipeline to prevent unauthenticated access.
- Environment Safety: Keep your
NVM_API_KEYsecure. Never commit it to version control systems like GitHub. - Dependency versioning: Ensure your
package.jsonincludes"type": "module"if using the TypeScript SDK to ensure proper subpath resolution.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-aaitor-nevermined-payments": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, external-api