API ReferenceMerchant agent

Reconcile an UNKNOWN refund from the provider record

POST
/console/api/reconcile

Reads the provider's refund for the case's stable request id and checks amount, currency and status. Nothing is sent again. Only a refund in state UNKNOWN is reconciled.

Authorization

consoleSession csrfToken
clearwake_console<token>

Set by GET /console/api/session. HttpOnly, SameSite=Strict, 8 hours.

In: cookie

X-Clearwake-CSRF<token>

The csrf value from GET /console/api/session, an HMAC of the session id. Required on every POST.

In: header

Request Body

application/json

The case id whose UNKNOWN refund is read back from the provider.

The body of reconcile: the case whose UNKNOWN refund is read back from the provider.

case_id*string

The case id as shown in the console, for example PP-D-REH-BE1428B853.

Match^[A-Za-z0-9_-]{1,64}$

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/console/api/reconcile" \  -H "Content-Type: application/json" \  -d '{    "case_id": "PP-D-REH-BE1428B853"  }'
{  "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": []}