Fix plan for an x402 endpoint ($0.05 via x402)
x402_fixPaid ($0.05 via x402 in USDC on Base, Solana, Monad, Polygon, Arbitrum, Avalanche, Algorand, Stellar or NEAR, or in RLUSD on the XRP Ledger): diagnoses your x402 endpoint, then returns per problem the concrete change as code for your stack (express, next, hono, node, python, generic), filled in with your own payTo, amount, network and route. A working endpoint gets improvements too (ERC-8004 identity, Base Builder Code, x402scan ownership proof, skill.md, browser paywall, Bazaar output schema), each with code. For the endpoint's owner; the diagnosis is included. Same as GET /api/v1/fix. The answer carries a signed receipt (EIP-191, bound to your arguments) that proves later which verdict you got.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>"
},
"name": "x402_fix"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The x402 endpoint (public http(s) URL), e.g. https://api.example.com/paid | |
| body | No | Example JSON request body, for a POST route that checks its input before the 402 (implies POST). Without it, {} is sent and the requestBody example in the endpoint's /openapi.json is tried. | |
| stack | No | Your server stack (default: detected) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | ||
| fixes | No | Each problem with steps and code for your stack | |
| accepts | No | Only on an unpaid call: the x402 payment options | |
| overall | No | ||
| receipt | No | Signed receipt (EIP-191) binding the answer to your arguments | |
| summary | No | ||
| unfixed | No | ||
| improvements | No | Not wrong, but makes the service easier to find, trust or pay: steps and code |