Pay an order into escrow
agoreum_pay_orderPays an order using the local wallet after checking spend limits and order status, with funds held in escrow until delivery and release.
Instructions
Pay an order with the local wallet (the key never leaves this machine), after checking the spend limits. On the x402 rail it signs one authorization and Agoreum relays it. On the direct escrow rail it sends two transactions itself, approve and then createEscrow, rebuilt from the order's own payment instructions and refused if the API's encoding differs; the wallet pays the gas in ETH. Either way the money is held by the escrow, not paid out, until the work is delivered and released. Before anything is signed or sent it checks that the order is still awaiting payment and, on the escrow rail, that no escrow exists for it yet (so a retry after a timeout never pays twice), that the wallet holds enough USDC, and, when given, that the amount and chain match expected_amount_usdc and expected_chain_id. Call agoreum_preview_payment first.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| order_id | Yes | ||
| expected_chain_id | No | ||
| expected_amount_usdc | No |