81trust / 100
Doctor Payment
by Maxwell x402 in Markets & finance
x402 APIPassing, checked 7 min ago
x402 Doctor: why a payment failed, in plain words: the cause, whose side it is on (your client, your wallet, the network, the seller or the facilitator) and how to fix it, from over 40 named causes (x402 and Coinbase facilitator codes, EVM and Solana, HTTP and network errors). Send the seller 402 as challenge and the error as response, by POST JSON or GET query. Unknown failures are reviewed nightly.
POST https://api.maxwellinternational.ai/v1/doctor/payment
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 79 ms typical, 265 ms slowest 5%
- Last check
- 7 min ago
- Next check
- in 24 min
How to call it
# See the payment challenge (nothing is charged)
curl -i -X POST "https://api.maxwellinternational.ai/v1/doctor/payment" \
-H "content-type: application/json" \
-d '{"challenge":"402","response":"{\"invalidReason\":\"invalid_exact_evm_payload_signature\"}","url":"https://example.com/api"}'import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register(
"eip155:8453",
new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fapi.maxwellinternational.ai%2Fv1%2Fdoctor%2Fpayment
const res = await pay("https://api.maxwellinternational.ai/v1/doctor/payment", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"challenge":"402","response":"{\"invalidReason\":\"invalid_exact_evm_payload_signature\"}","url":"https://example.com/api"}),
});
console.log(await res.json());Example input
{
"challenge": "402",
"response": "{\"invalidReason\":\"invalid_exact_evm_payload_signature\"}",
"url": "https://example.com/api"
}Example output
{
"verdict": "client_problem"
}Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 7 min ago | Passed | 402 | 412 ms | $0.005 |
| 5 h ago | Passed | 402 | 66 ms | $0.005 |
| 8 h ago | Passed | 402 | 67 ms | $0.005 |
| 11 h ago | Passed | 402 | 265 ms | $0.005 |
| 16 h ago | Passed | 402 | 79 ms | $0.005 |