{"service":"HALOWERK x402werk","endpoint":"/reconcile","method":"POST","content_type":"application/json","inputSchema":{"type":"object","required":["chain","address","receipts"],"additionalProperties":false,"properties":{"chain":{"type":"string","enum":["arb","arbitrum","arbitrum-one","avalanche","avax","base","base-mainnet","base-sepolia","basesepolia","eip155:1","eip155:10","eip155:137","eip155:42161","eip155:43114","eip155:8453","eip155:84532","eth","ethereum","ethereum-mainnet","mainnet","matic","op","op-mainnet","optimism","polygon"],"description":"Chain as CAIP-2, short name or chain id."},"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Your receiving address whose incoming transfers should be read."},"asset":{"type":"string","description":"Token contract address to reconcile. Defaults to the canonical USDC of that chain."},"receipts":{"type":"array","minItems":1,"maxItems":500,"description":"Your receipts. Each needs at least amount_units; tx_hash makes the match strong, payer and ts make the fallback match possible.","items":{"type":"object","additionalProperties":false,"required":["amount_units"],"properties":{"receipt_id":{"type":"string","maxLength":200,"description":"Your own identifier for this receipt. Echoed back in every result."},"payment_id":{"type":"string","maxLength":200,"description":"Payment identifier, used to detect duplicate receipts."},"tx_hash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$","description":"Settlement transaction hash, if you recorded one."},"amount_units":{"type":"string","pattern":"^[0-9]{1,78}$","description":"Amount as an integer in the smallest unit of the token."},"payer":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Address you believe paid."},"ts":{"type":"integer","description":"Unix seconds when the receipt was issued. Needed for the amount-and-time fallback match."}}}},"window":{"type":"object","additionalProperties":false,"properties":{"from":{"type":"integer","description":"Start of the window as unix seconds. Resolved to a block by reading real blocks."},"to":{"type":"integer","description":"End of the window as unix seconds."},"from_block":{"type":"integer","minimum":0,"description":"Start block. Takes precedence over from."},"to_block":{"type":"integer","minimum":0,"description":"End block. Takes precedence over to."}}},"time_tolerance_seconds":{"type":"integer","minimum":0,"maximum":86400,"default":300,"description":"How far a receipt timestamp may sit from the block time of a payment and still match. Receipt and chain rarely carry the same second."}}},"requestExample":{"chain":"arb","address":"0x0000000000000000000000000000000000000000","receipts":[{"amount_units":"0"}],"time_tolerance_seconds":300},"operations":[{"method":"POST","inputSchema":{"type":"object","required":["chain","address","receipts"],"additionalProperties":false,"properties":{"chain":{"type":"string","enum":["arb","arbitrum","arbitrum-one","avalanche","avax","base","base-mainnet","base-sepolia","basesepolia","eip155:1","eip155:10","eip155:137","eip155:42161","eip155:43114","eip155:8453","eip155:84532","eth","ethereum","ethereum-mainnet","mainnet","matic","op","op-mainnet","optimism","polygon"],"description":"Chain as CAIP-2, short name or chain id."},"address":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Your receiving address whose incoming transfers should be read."},"asset":{"type":"string","description":"Token contract address to reconcile. Defaults to the canonical USDC of that chain."},"receipts":{"type":"array","minItems":1,"maxItems":500,"description":"Your receipts. Each needs at least amount_units; tx_hash makes the match strong, payer and ts make the fallback match possible.","items":{"type":"object","additionalProperties":false,"required":["amount_units"],"properties":{"receipt_id":{"type":"string","maxLength":200,"description":"Your own identifier for this receipt. Echoed back in every result."},"payment_id":{"type":"string","maxLength":200,"description":"Payment identifier, used to detect duplicate receipts."},"tx_hash":{"type":"string","pattern":"^0x[0-9a-fA-F]{64}$","description":"Settlement transaction hash, if you recorded one."},"amount_units":{"type":"string","pattern":"^[0-9]{1,78}$","description":"Amount as an integer in the smallest unit of the token."},"payer":{"type":"string","pattern":"^0x[0-9a-fA-F]{40}$","description":"Address you believe paid."},"ts":{"type":"integer","description":"Unix seconds when the receipt was issued. Needed for the amount-and-time fallback match."}}}},"window":{"type":"object","additionalProperties":false,"properties":{"from":{"type":"integer","description":"Start of the window as unix seconds. Resolved to a block by reading real blocks."},"to":{"type":"integer","description":"End of the window as unix seconds."},"from_block":{"type":"integer","minimum":0,"description":"Start block. Takes precedence over from."},"to_block":{"type":"integer","minimum":0,"description":"End block. Takes precedence over to."}}},"time_tolerance_seconds":{"type":"integer","minimum":0,"maximum":86400,"default":300,"description":"How far a receipt timestamp may sit from the block time of a payment and still match. Receipt and chain rarely carry the same second."}}},"requestExample":{"chain":"arb","address":"0x0000000000000000000000000000000000000000","receipts":[{"amount_units":"0"}],"time_tolerance_seconds":300}}],"example_request":{"chain":"arb","address":"0x0000000000000000000000000000000000000000","receipts":[{"amount_units":"0"}],"time_tolerance_seconds":300},"serviceName":"x402_reconcile","tags":["x402","x402-infra","agent-payments","reconciliation","accounting"],"outputSchema":{"type":"object","properties":{"matched":{"type":"array","items":{"type":"object"}},"receipts_without_payment":{"type":"array","items":{"type":"object"}},"payments_without_receipt":{"type":"array","items":{"type":"object"}},"amount_mismatches":{"type":"array","items":{"type":"object"}},"duplicates":{"type":"array","items":{"type":"object"}},"totals":{"type":"object"},"coverage_pct":{"type":"number"},"window_used":{"type":"object"},"thresholds_used":{"type":"object"},"ts_fetched":{"type":"integer"},"age_ms":{"type":"integer"},"unavailable_fields":{"type":"array","items":{"type":"string"}}}}}