{"uid":"cap__8HwxqBFtIh2aDtpQqsKp","slug":"conditional-settlement-rule-attachment-for-x402-payments-1a2ad9b3","name":"Conditional Settlement Rule Attachment for x402 Payments","description":"Agent-facing decision procedure for attaching executable conditions to an x402 payment so the rule, not just the money, travels with the settlement. Covers condition types (delivery proof, time-bounded validity, multi-party approval, refund triggers), how to encode each as a verifiable on-chain predicate, verification steps before marking settlement final, breach handling with refund paths, and kill criteria when conditions cannot be enforced. Inputs: payment intent, counterparty address,","url":"https://k2so-8080.on.ascii.dev/api/services/conditional-settlement-rule-attachment-procedure?utm_source=zero.xyz","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":"Conditional settlement rule attachment for x402 payments 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":null,"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":"unknown","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_bsM6UHTxH-pSIy2QefLjG","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 an agent-facing decision procedure for encoding and attaching verifiable conditions (delivery proof, time bounds, multi-party approval, refund triggers) to an x402 payment so that rules travel with the settlement on-chain.","exampleAgentPrompt":"Walk me through how to attach a conditional settlement rule to an x402 payment — specifically one that only finalizes after delivery proof is confirmed — including how to encode it as an on-chain predicate, what verification steps to run, and what refund path to follow if the condition is breached.","exampleUseCases":[{"title":"Delivery-gated agent payment release","prompt":"I'm about to send an x402 payment to a supplier agent, but I only want it to settle once delivery proof is confirmed on-chain. Walk me through the condition encoding, how to verify the predicate before marking it final, and what to do if the delivery proof never arrives."},{"title":"Time-bounded escrow for multi-party approval","prompt":"I need to set up an x402 payment that's only valid for the next 48 hours and requires sign-off from two counterparties before it settles. What's the procedure for encoding those conditions as on-chain predicates and handling the case where one party doesn't approve in time?"},{"title":"Automatic refund trigger on failed condition","prompt":"I want to configure an x402 payment so that if the agreed service milestone isn't met by Friday, a refund is automatically triggered. What condition type should I use, how do I encode the breach trigger on-chain, and what are the kill criteria if the condition can't be enforced?"}],"resultDescription":"The endpoint returns a structured decision-procedure document (prose) covering: which condition type to select (delivery proof, time-bounded validity, multi-party approval, or refund trigger), how to encode each as a verifiable on-chain predicate, pre-settlement verification steps, breach handling with refund paths, and kill criteria when conditions cannot be enforced. Also returns metadata like the generating model, ISO-8601 timestamp, and generation source.","failureModes":["Payment not made: returns 402 if the $0.002 USDC x402 payment header is missing or invalid","Topic not recognized: may return an unhelpful or generic procedure if the topic override is unsupported","LLM generation failure: result.ok may be false with no procedure prose if the backend reasoning step fails","Stale content: generatedAt timestamp may reveal outdated guidance if the service hasn't refreshed its reasoning","Network timeout: the k2so-8080.on.ascii.dev host may be intermittently unreachable as a non-enterprise service"],"whenToPreferThis":"Choose this endpoint when an AI agent needs structured, actionable guidance on making x402 payments conditional — i.e., when the payment logic itself must embed rules (delivery proof, time windows, multi-sig approval, refund triggers) rather than relying on off-chain enforcement. Prefer this over generic smart-contract documentation when you need an agent-optimized decision procedure with breach and kill-criteria handling already reasoned through.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-16T06:47:42.683Z","isFirstParty":false,"canonicalSlug":"conditional-settlement-rule-attachment-for-x402-payments-1a2ad9b3"}