Reciprocal Ruler - settlement reconciliation (x402 paid)
ruler_reconcileReconciles expected vs. actual KRW settlements, returns SETTLED_OK, COMPENSATED, or PENDING_RECONCILIATION, and logs each idempotent judgment in an append-only audit ledger.
Instructions
Idempotent settlement reconciliation recorded in an append-only audit ledger. Costs $0.25 USDC on Base via x402; without payment it returns the decoded payment challenge and Base USDC instructions. Reusing the same idempotency_key makes a retry return the original judgment instead of charging again, so always pass the key your first attempt used. Judgment is one of SETTLED_OK, COMPENSATED, PENDING_RECONCILIATION.
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": {
"idempotency_key": "<idempotency_key>",
"expected_amount_krw": "<expected_amount_krw>",
"actual_settled_krw": "<actual_settled_krw>"
},
"name": "ruler_reconcile"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tx_id | No | Your transaction or order id. | |
| event_type | No | POST_TRADE_REFUND | |
| quote_hash | No | quote_hash issued by ruler_quote_lock for this trade. | |
| holdback_krw | No | Holdback reserved from the payment (KRW). | |
| payment_header | No | Signed x402 payment payload (X-PAYMENT). Omit to receive the challenge. | |
| idempotency_key | Yes | Your stable key for this settlement (required: it makes retries free). | |
| actual_settled_krw | Yes | Amount that actually settled (KRW). | |
| expected_amount_krw | Yes | Agreed amount the supplier should receive (KRW). |