- Chat-native payments: subscribers order plans, check balances, and query paid agents from Telegram, Discord, WhatsApp, or any other connected channel.
- x402 built in: the plugin handles the full payment lifecycle — token acquisition, permission verification, and credit settlement — automatically.
- Builder and subscriber tools: 7 payment tools and 2 slash commands cover both sides of the marketplace, from agent registration to paid queries.
- Paid HTTP endpoint: enable a single config flag and the gateway exposes an x402-compatible endpoint that verifies, processes, and settles requests without custom code.
Architecture
Features
The Nevermined OpenClaw plugin provides a complete set of tools for both builders and subscribers:- Payment Signature Authentication: the paid endpoint extracts access tokens from the
payment-signatureheader and verifies them against Nevermined. - Credit Verification and Settlement: validates subscriber balance before processing and burns credits only after successful execution.
- Multi-Channel Support: one plugin instance handles payments across every channel your OpenClaw gateway connects to.
- Agent Registration from Chat: register agents and create payment plans directly from any messaging channel — no dashboard required.
- Flexible Pricing: supports fiat (Stripe/USD), ERC20 tokens (USDC), and native cryptocurrency payment plans.
- Balance Awareness: when configured, the plugin injects the current credit balance into the agent’s context so your Claw can proactively warn users about low credits.
Quickstart
1. Get Your API Key
To interact with the Nevermined API, you need an API key. Follow the Get Your API Key guide to create one.
2. Install the Plugin
From your OpenClaw gateway server:Restart the gateway after installation:You should see in the logs:
Register an Agent and Payment Plan
Once authenticated, register your agent directly from chat. Send a message like:Register a Nevermined agent called “Legal Assistant” at URLThe gateway callshttps://my-gateway.example.com/nevermined/agentwith a plan named “Legal Queries” priced at 1000000 to address0xYourWalletAddresswith token0x036CbD53842c5426634e7929541eC2318f3dCF7egranting 10 credits.
nevermined_registerAgent and returns an agentId and planId. Save these for configuration.
Enable the Paid Endpoint
Add the returned IDs to your gateway config (~/.openclaw/openclaw.json) and enable the paid endpoint:
- Extracts the
payment-signatureheader from incoming requests - Calls
verifyPermissionsto check the subscriber has credits - Processes the request through your agent handler
- Calls
settlePermissionsto burn credits - Returns the response with a
payment-responseheader
Query a Paid Agent
From the subscriber side (same or different gateway), the full flow works from chat: Order a plan:
Order the Legal Assistant plan <plan-id>
The gateway calls nevermined_orderPlan and credits are granted.
Query the agent:
Ask the Legal Assistant at https://my-gateway.example.com/nevermined/agent to summarize the latest GDPR amendments
The gateway calls nevermined_queryAgent, which acquires an x402 token, sends the prompt with a payment-signature header, and returns the response — all in one step.
Check your balance:
Check my Nevermined balance for plan <plan-id>
Credits are decremented after each successful query.
Custom Agent Handlers
The plugin includes a default handler for demonstration. To use your own logic, pass a customagentHandler when registering the plugin:
{ prompt: string } and returns any JSON-serializable object.