{"uid":"cap_X-DeOwvIoEem2QcrquJSQ","slug":"expired-x402-challenge-re-probe-and-re-payment-decision-procedure-9a3e65ee","name":"Expired x402 Challenge Re-Probe and Re-Payment Decision Procedure","description":"Decision procedure for an agent that encounters a stale or expired x402 challenge. Covers expiry detection from WWW-Authenticate headers and cached challenge metadata, safe re-probing of the same resource URL without double-paying, handling price drift between the original challenge and the settlement receipt, and binding the fresh challenge to the original payment intent using a new nonce while preserving idempotency.","url":"https://k2so.wrong.systems/api/services/expired-challenge-re-probe-and-re-payment-standa","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","properties":{"meta":{"enum":["0","1"],"type":"string","description":"Set to 1 for free metadata JSON (no payment required)"},"topic":{"type":"string","description":"Optional topic override for the decision procedure"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","title":"Expired challenge re-probe and re-payment standard paid response","$schema":"https://json-schema.org/draft/2020-12/schema","required":["ok","paid","service","provider","result"],"properties":{"ok":{"type":"boolean"},"paid":{"type":"boolean"},"result":{"type":"object","required":["ok","service"],"properties":{"ok":{"type":"boolean","description":"Handler success"},"brief":{"type":"string","description":"Decision procedure prose for agents"},"model":{"type":"string"},"topic":{"type":"string"},"service":{"type":"string","description":"Service slug"},"procedure":{"type":"string"},"generatedAt":{"type":"string","description":"ISO-8601 timestamp"},"generationSource":{"enum":["llm","reasoning","deterministic"],"type":"string"}}},"payment":{"type":"object","properties":{"code":{"type":"string"},"payer":{"type":"string"},"detail":{"type":"string"},"selfPay":{"type":"boolean"},"transaction":{"type":"string"}}},"service":{"type":"string"},"provider":{"type":"string","const":"K-2SO"}}}}}}},"responseSchema":{"type":"json","example":{"ok":true,"paid":true,"result":{"ok":true,"brief":"plain prose decision procedure (120+ words)","model":"deepseek/deepseek-v4-flash-0731","topic":"string topic","service":"expired-challenge-re-probe-and-re-payment-standa","procedure":"same as brief","generatedAt":"2026-01-01T00:00:00.000Z","generationSource":"deterministic"},"service":"expired-challenge-re-probe-and-re-payment-standa","provider":"K-2SO"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"down","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_wDrPSbDYmj-J13oYk9USi","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns a decision procedure guide for agents handling stale or expired x402 payment challenges, covering expiry detection, safe re-probing, price drift handling, and idempotent re-payment.","exampleAgentPrompt":"I just got an expired x402 challenge back from a resource I was trying to pay for — can you walk me through the decision procedure for safely re-probing that URL and re-paying without accidentally double-charging myself?","exampleUseCases":[{"title":"Autonomous agent retrying stale payment challenge","prompt":"My agent cached an x402 challenge an hour ago and now the server is rejecting the payment as expired — what's the correct procedure for re-probing the URL and issuing a fresh payment without double-paying?"},{"title":"Handling price drift after challenge expiry","prompt":"The original x402 challenge quoted me 0.002 USDC but after it expired and I re-probed, the new challenge shows a different price — how should my agent handle this price drift and decide whether to proceed?"},{"title":"Preserving idempotency across x402 retry attempts","prompt":"My agent is retrying an expired x402 challenge and I need to make sure the new nonce is properly bound to the original payment intent so the transaction stays idempotent — what's the right procedure for that?"}],"resultDescription":"A prose decision procedure brief explaining how an agent should detect x402 challenge expiry from WWW-Authenticate headers or cached metadata, safely re-probe the resource URL without triggering a double payment, handle any price drift between original and fresh challenges, and bind the new nonce to the original payment intent to maintain idempotency. Response includes metadata fields: topic, service slug, model used, generation source, and an ISO-8601 timestamp.","failureModes":["Endpoint returns an HTTP 402 itself if payment headers are missing or invalid","Malformed input schema results in a 400 error","LLM generation failure may return ok:false with an error description in the result","Price drift beyond agent-configured tolerance may not be handled if topic override is not supplied","Stale or unavailable upstream LLM may cause generation delay or timeout"],"whenToPreferThis":"Use this endpoint when an AI agent has received an expired or stale x402 challenge and needs a structured, authoritative decision procedure for re-probing and re-paying safely. Prefer this over generic x402 documentation when idempotency, price drift, and nonce binding are concerns in automated agent payment flows. Particularly valuable in long-running autonomous agents where challenges may expire between issuance and settlement.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:25:25.698Z","isFirstParty":false}