API ReferenceLedger and receipts
Everything the console shows
The mandate, the product catalog, purchases, every case entry with its history, the approval inbox, the money ledger, the dispute ledger (PayPal stage and status next to the policy decision and the model proposal), the fee gauge and the policy limits.
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/console/api/state"{ "label": "local run data", "mode": "local", "hosted": false, "folder": "run-20261111-104352-aecb", "model": "scripted, not AI", "network": "none: local provider, no provider calls", "mandate": { "owner": "Local run shopper", "budget": "102.00", "per_item_cap": "102.00", "merchants": [ "clearwake-sandbox-store" ], "categories": [ "home", "stationery" ], "currency": "USD", "spent": "9.00", "remaining": "93.00" }, "merchant": { "id": "clearwake-sandbox-store", "name": "Northwind Goods (sandbox store)" }, "catalog": [ { "id": "mug-stone", "name": "Stoneware mug", "category": "home", "price_minor": 1200, "price": "12.00" }, { "id": "notebook-a5", "name": "A5 dot grid notebook", "category": "stationery", "price_minor": 900, "price": "9.00" }, { "id": "pen-brass", "name": "Brass pen", "category": "stationery", "price_minor": 1800, "price": "18.00" }, { "id": "lamp-desk", "name": "Desk lamp", "category": "home", "price_minor": 4500, "price": "45.00" }, { "id": "headphones", "name": "Wireless headphones", "category": "electronics", "price_minor": 8900, "price": "89.00" }, { "id": "socks-wool", "name": "Wool socks", "category": "apparel", "price_minor": 1500, "price": "15.00" } ], "purchases": [ { "at": "2026-11-11T07:17:29Z", "request": "a pack of three A5 notebooks", "model": "scripted, not AI", "proposed": "notebook-a5", "note": "", "allowed": true, "reason": "Inside the mandate.", "checks": { "merchant allowed": true, "category allowed": true, "currency matches": true, "under per item cap": true, "inside remaining budget": true }, "product": { "id": "notebook-a5", "name": "A5 dot grid notebook", "category": "stationery", "price_minor": 900 }, "price_minor": 900, "spent_before_minor": 0, "receipt": { "order_id": "ORDER-REH-F25B12B6", "digest": "99b3f61426ac58d69e87918393a71e55121e34a9dc9959e578a6dda247d6d108", "public_key": "080adcb3ed838b286019be62db1c0f0e178f89d8ae2c59b7cdefc24ec9964e5a", "line": "{\"step_id\":\"mandate:ORDER-REH-F25B12B6\",\"action_id\":\"clearwake.buyer.mandate\",\"params\":{\"order_id\":\"ORDER-REH-F25B12B6\",\"merchant\":\"clearwake-sandbox-store\",\"item\":\"notebook-a5\",\"price_minor\":900,\"currency\":\"USD\",\"budget_minor\":10200,\"per_item_cap_minor\":10200,\"allowed_categories\":[\"home\",\"stationery\"],\"dispute_rule\":\"none\",\"max_over_market_percent\":-1,\"price_reference\":\"none\"},\"success\":true,\"ts_ms\":1794381449742,\"actor\":{\"agent\":\"clearwake-buyer\",\"user\":\"Local run shopper\"},\"public_key\":\"080adcb3ed838b286019be62db1c0f0e178f89d8ae2c59b7cdefc24ec9964e5a\",\"signature\":\"cd249dd7c01fb71413b28e7e07921e917b67bec824250f88dc5e0d03e8433f8dba7f34aacdbe9ad09ca9a5e750099ede5e780bf46b0b72d43ede434f25f8ae07\"}", "log_ok": true, "log_lines": 1 }, "label": "local run data" } ], "policy": { "refund_max": "5.00", "approval_above": "2.00", "per_customer_per_day": "6.00", "hash": "396af6170103c7e2570b7c4f159e18543160e14127a05f873135a366bd7af271" }, "cases": [ { "key": "c", "title": "Refund under the limit, checked against the provider record", "dispute": false, "scope": "product" }, { "key": "d", "title": "Above the approval threshold: approval inbox, then refund", "dispute": false, "scope": "product" }, { "key": "e", "title": "Lost response: held as UNKNOWN, no blind retry, reconciled from the record", "dispute": false, "scope": "product" }, { "key": "f", "title": "Three agents split refunds on one capture; the one over the capture is stopped", "dispute": false, "scope": "product" }, { "key": "g", "title": "Prompt injection cannot move a limit; the receipt shows the refusal", "dispute": false, "scope": "product" }, { "key": "i", "title": "Item not received: tracking submitted before the deadline", "dispute": true, "scope": "product" }, { "key": "j", "title": "Agent order disputed as unauthorised: mandate receipt attached", "dispute": true, "scope": "outside" }, { "key": "k", "title": "Near deadline: escalated with the countdown", "dispute": true, "scope": "product" }, { "key": "l", "title": "Batch of ten disputes in parallel", "dispute": true, "scope": "outside" }, { "key": "n", "title": "Settle in conversation before escalation: offer inside the limit, PayPal record checked", "dispute": true, "scope": "outside" }, { "key": "m", "title": "Network cut mid batch: held, offline, then PayPal read first and no duplicate", "dispute": false, "scope": "product" }, { "key": "o", "title": "Buyer says 2 of 3 items arrived: dispatch proof counted 3, sealed; evidence sent", "dispute": true, "scope": "product" } ], "entries": [ { "id": "PP-D-REH-94816C42B4", "key": "n", "run": "b38ce4", "title": "Settle in conversation before escalation: offer inside the limit, PayPal record checked", "at": "2026-11-11T07:17:29Z", "kind": "PayPal dispute", "label": "local run data", "state": "VERIFIED", "action": "settle_by_offer", "detail": "Settled, no fee: PayPal shows RESOLVED (RESOLVED_WITH_PAYOUT) at the INQUIRY stage, never a claim.", "refund_id": null, "approval_id": null, "proposed": "settle_by_offer", "model": "scripted, not AI", "decided": "settle_by_offer", "offer": "2.50", "dispatch": null, "claim": null, "gateway": "completed", "adapter": "console", "history": [ { "at": "2026-11-11T07:17:29Z", "state": "PENDING", "action": "settle_by_offer", "detail": "Offer sent. PayPal shows WAITING_FOR_BUYER_RESPONSE; waiting for the buyer.", "note": "" }, { "at": "2026-11-11T07:17:29Z", "state": "VERIFIED", "action": "settle_by_offer", "detail": "Settled, no fee: PayPal shows RESOLVED (RESOLVED_WITH_PAYOUT) at the INQUIRY stage, never a claim.", "note": "The buyer accepted the offer (the local provider records it; in the sandbox the buyer accepts in PayPal's Resolution Center)." } ], "dispute_id": "PP-D-REH-94816C42B4", "reason": "MERCHANDISE_OR_SERVICE_NOT_AS_DESCRIBED", "amount_minor": 250, "capture": "CAP-N-b38ce4", "capture_minor": 900, "customer": "buyer-n-b38ce4", "order": "ORDER-N-b38ce4", "due": "2026-11-21T07:17:29.805243Z", "message": "The colour is wrong.", "use_trackers": false, "receipt_digest": null, "deadline": { "seconds_left": 863999, "state": "ok" }, "sources": [], "policy": { "allowed": false, "needs_approval": false, "reason": "no money action proposed", "limit": null } } ], "runs": [ { "key": "n", "run": "b38ce4", "at": "2026-11-11T07:17:29Z", "title": "Settle in conversation before escalation: offer inside the limit, PayPal record checked", "states": [ "VERIFIED" ], "seconds": 0.084 } ], "inbox": [], "ledger": { "rows": [ { "at": "2026-11-11T07:17:29Z", "case": "ORDER-REH-F25B12B6", "movement": "buyer to merchant (mandate only, no checkout)", "amount": "9.00", "currency": "USD", "record": "99b3f61426ac58d6", "state": "mandate signed", "source": "local run data" } ], "provider_refunds": 1 }, "gauge": { "amount_minor": 0, "cap": "5.00", "case": null, "state": null }, "disputes": [ { "dispute": "PP-D-REH-94816C42B4", "case": "n", "reason": "MERCHANDISE_OR_SERVICE_NOT_AS_DESCRIBED", "amount": "2.50", "stage": "INQUIRY", "paypal_status": "RESOLVED", "decided": "settle_by_offer", "proposed": "settle_by_offer", "model": "scripted, not AI", "state": "VERIFIED", "due": "2026-11-21T07:17:29.805243Z", "dispatch": "none", "message": "The colour is wrong.", "policy_reason": "Settled, no fee: PayPal shows RESOLVED (RESOLVED_WITH_PAYOUT) at the INQUIRY stage, never a claim.", "record": { "dispute_id": "PP-D-REH-94816C42B4", "status": "RESOLVED", "reason": "MERCHANDISE_OR_SERVICE_NOT_AS_DESCRIBED", "dispute_life_cycle_stage": "INQUIRY", "links": [ { "rel": "send_message", "method": "POST" }, { "rel": "make_offer", "method": "POST" }, { "rel": "accept_claim", "method": "POST" } ], "dispute_amount": { "currency_code": "USD", "value": "2.50" }, "seller_response_due_date": "2026-11-21T07:17:29.805243Z", "disputed_transactions": [ { "seller_transaction_id": "CAP-N-b38ce4" } ], "messages": [ { "posted_by": "BUYER", "content": "The colour is wrong." }, { "posted_by": "SELLER", "content": "We are sorry about this order. To settle it now, we offer a refund of 2.50 USD (full amount).", "request_id": "944355a7-4c89-4520-9218-25ca366e7f95" } ], "offer": { "offer_type": "REFUND", "request_id": "944355a7-4c89-4520-9218-25ca366e7f95", "buyer_requested_amount": { "currency_code": "USD", "value": "2.50" }, "seller_offered_amount": { "currency_code": "USD", "value": "2.50" } }, "dispute_outcome": { "outcome_code": "RESOLVED_WITH_PAYOUT", "amount_refunded": { "currency_code": "USD", "value": "2.50" } } }, "settled_before_escalation": true, "fee_avoided": "0.00", "source": "local run data" } ], "fees": { "sales": 1, "net_sales": "9.00", "counted_disputes": 1, "disputed": "2.50", "rate_percent": "27.78", "rate_line_percent": "1.50", "sales_line": 100, "high_volume": false, "settled_before_escalation": 1, "escalated": 0, "fee_avoided": "0.00", "currency": "USD", "window": [ "2026-08-01", "2026-11-11" ], "rule_source": [ "PayPal Help Center, help350 (UK edition; the US edition was not reachable on 31 Oct 2026)", "https://history.paypal.com/uk/cshelp/article/how-is-the-dispute-rate-calculated-and-how-do-i-avoid-being-charged-a-dispute-fee-help350" ], "fee_source": [ "PayPal Merchant Fees, United States, last updated 1 Oct 2026", "https://www.paypal.com/us/business/paypal-business-fees" ], "label": "local run data" }, "now": "2026-11-11T07:17:29Z", "rules": { "last": {}, "ceiling": "100.00", "label": "rule parser, not AI" }}Start a session and get the CSRF token GET
Sets the HttpOnly `clearwake_console` cookie when the request has none and returns the token to send as `X-Clearwake-CSRF` on every POST.
Both signed receipt logs GET
The merchant log and the buyer log as written, with their public keys. Each is verifiable offline, in the browser or with the verdock-core verifier. Editing one line breaks the chain.