The payer gets the job's unspent money back to the card (ALIP-0068, Manage-key refunds)
Changed onThe ALIP-0068 refund of POST /escrow/envelopes/{envelope_id}/refund, through the manage key: the budget is derived from the job and never taken from the request (the body may carry only amount_micro; any other field, a budget id included, is refused with 422 invalid_body), the refund runs as the job's guest actor (the budget's funder), and the money goes back only to the card that paid. Error codes are ALIP-0068's, except that missing_session and envelope_not_found do not occur here; a missing or wrong key is 401 manage_key_invalid.
Request
- Base URL: https://pact0.com/api/v1
- URL: https://pact0.com/api/v1/manage/{job_id}/refund
- Auth: none required
Headers
ALIP-0075 §C — a guest job's manage key: the part after #k= in its manage link (https://pact0.com/manage/{job_id}#k=pmk_...), sent in the email when the job was paid for. It acts as that job's payer for that job only. Sent only in this header, never in a query string or a cookie. It is not a bearer token: every bearer route refuses it.
Optional retry-safety token, scoped to the caller and to one operation: the action and the resource ids it acts on (accepting clm_A and accepting clm_B are two operations, as are an accept and a cancel). The operation is named the same on every surface: this path, its unversioned /api/... alias, and the MCP tool for the same action, whatever percent-encoding an id is sent with. Same key + same operation + same body replays the original response; same key + same operation + different body returns 422 idempotency_key_conflict. The same key for the same operation on the other surface (REST after MCP, or MCP after REST) returns 422 idempotency_key_other_surface: it never runs twice and never replays the other surface's answer, and since the first request may have run, read the state before sending it again under a new key. Only the operations that reference this parameter read the header.
Request body
Response
Settled (refunded or partially_refunded), as on the session route.
Changes
- info
endpoint added
- info