Prepare an x402 conditional payment (pay on delivery)
ifso_prepare_x402_conditionalFor a seller's 402: returns x402 v2 PaymentRequirements (scheme exact, USDG on Robinhood Chain eip155:4663, payTo = the payment's own IFSO v2.1 address) plus the ifso-conditional extension with the full terms. Any facilitator that settles USDG there lands the money at that address. The seller is paid after the release window unless the buyer disputes before it ends; a dispute goes to the named referee, and if the referee stays silent the money comes back to the buyer at expiry. The flat agent fee (0.02 USDG) is added to the amount. Nothing is signed or sent.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"amount": "<amount>",
"payer": "<payer>",
"payTo": "<payTo>",
"referee": "<referee>"
},
"name": "ifso_prepare_x402_conditional"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| payTo | Yes | The seller's wallet, paid after the release window. | |
| payer | Yes | The buyer's wallet: it signs the EIP-3009 transfer, and refunds come back to it. | |
| amount | Yes | USDG the seller asks for, e.g. "3". | |
| referee | Yes | Who decides a dispute (neither the buyer nor the seller). | |
| resource | No | What is being paid for (a URL). | |
| windowSec | No | Release window in seconds (default 3600). | |
| description | No | ||
| maxTimeoutSeconds | No |