A

Action402 · Execute Webhook

by Action402

POSTBase

$0.003

per call · USD Coin on Base

Paid webhook/API execution for autonomous agents. Executes one public HTTPS action after x402 payment, applies retries and idempotency, then returns a signed receipt with request hash, response hash, target, status, and attempt count.

Endpoint

POST https://action402.vercel.app/api/execute/webhook

39

Calls / 30d

15

Unique payers / 30d

Sep 10

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";

const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);

const res = await fetchWithPay("https://action402.vercel.app/api/execute/webhook", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "body": {
      "event": "agent.test",
      "message": "hello from an x402 buyer"
    },
    "headers": {
      "content-type": "application/json"
    },
    "idempotencyKey": "agent-test-001",
    "method": "POST",
    "retry": {
      "attempts": 2,
      "backoffMs": 300
    },
    "timeoutMs": 10000,
    "url": "https://httpbin.org/anything"
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://action402.vercel.app/api/execute/webhook" \
  -H "Content-Type: application/json" \
  -d '{"body":{"event":"agent.test","message":"hello from an x402 buyer"},"headers":{"content-type":"application/json"},"idempotencyKey":"agent-test-001","method":"POST","retry":{"attempts":2,"backoffMs":300},"timeoutMs":10000,"url":"https://httpbin.org/anything"}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "idempotentReplay": false,
  "job": {
    "attempts": 1,
    "id": "job_...",
    "status": "succeeded"
  },
  "links": {
    "job": "/api/jobs/job_...",
    "receipt": "/api/receipts/rcpt_..."
  },
  "mode": "x402",
  "receipt": {
    "id": "rcpt_...",
    "signature": "hmac-sha256:..."
  }
}

Payment details

Pay to0x75113dcf8ce34f0338440d40270e420f8c1762b8
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase
Schemesexact

Is this your API?

Pin it to the top of Developer Tools and the homepage with a featured placement.

Get featured →

More from Action402 & similar services