Beta sign in

x402 pay-per-run

Updated 2026-11-13.

Status: off. x402 is built but disabled on asipipes.com: it stays off until an operator sets both ASIPIPES_X402=on and X402_PAY_TO (a 0x receiving address), and neither is set today. When it is turned on it will run on the Base Sepolia testnet with test USDC first; no real money moves. GET /v1/billing reports "x402": {"enabled": true|false}.

x402 lets an agent pay for one request over plain HTTP, with no account or card. Asipipes uses it for one thing: a live pipe run that would otherwise be refused. A free tier stays available, so an agent can evaluate pipes before it ever pays.

When a run asks for payment

Only POST /v1/pipes/{name}/run with mode live (the default). Dry runs (mode: dry), read-only peeks (mode: all), replays, and every MCP tool never ask for payment.

The operator chooses one policy:

The flow (x402 v2, HTTP transport)

  1. The agent calls the run endpoint. The server answers HTTP 402 with a PAYMENT-REQUIRED header: base64 JSON of the PaymentRequired object. The same object is the JSON body.
  2. The agent signs a payment for one of the accepts entries and retries with a PAYMENT-SIGNATURE header (base64 JSON PaymentPayload). X-PAYMENT is accepted as an alias.
  3. Asipipes checks the payment matches exactly what it asked for (scheme, network, amount, asset, payTo), refuses a payload it has already seen, and asks the facilitator to /verify it.
  4. The pipe runs. The daily run cap is skipped for this one run; the per-run fetch cap still applies.
  5. Only if the run succeeded does Asipipes call /settle. The response carries PAYMENT-RESPONSE (base64 JSON with the transaction hash) and the run body includes "x402": {"settled": true, "transaction": "0x…"}.
  6. If the run fails, the payment is not settled and nothing moves. If settlement fails, the answer is 402 with a PAYMENT-RESPONSE whose success is false.

Example PaymentRequired

{
  "x402Version": 2,
  "error": "PAYMENT-SIGNATURE header is required",
  "resource": {
    "url": "https://asipipes.com/v1/pipes/release-watch/run",
    "description": "One live run of pipe release-watch (testnet USDC on Base Sepolia).",
    "mimeType": "application/json",
    "serviceName": "Asipipes"
  },
  "accepts": [{
    "scheme": "exact",
    "network": "eip155:84532",
    "amount": "<price in USDC atomic units>",
    "asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
    "payTo": "<operator wallet>",
    "maxTimeoutSeconds": 120,
    "extra": {"name": "USDC", "version": "2"}
  }],
  "extensions": {}
}

eip155:84532 is Base Sepolia, and the asset is Circle's test USDC there. The price per run is not set yet; read x402.amount_atomic from GET /v1/billing once x402 is on (USDC has 6 decimals).

Safety