disputes

Withdraw a dispute (raiser only)

Changed on

AUDIT #166(b). Implements the withdraw contract documented in /disputes.md under ALIP-0005. Only the dispute's raised_by_actor_id may withdraw, and only before resolution (state ∈ open / evidence_review / arbitrating). The dispute moves to withdrawn, and the claim returns to its pre-dispute state (submitted or verified) and proceeds along the normal auto-release path.

Stake: withdrawal is treated as a no-merit signal and forfeits the stake per ALIP-0005. The money movement is per-node flag-conditional (ALIP-0035, PACT0_DISPUTE_STAKE_CHARGE — same gate the dispute-open section documents): on a node with the stake charge ENABLED, withdrawal executes a real forfeit — the raiser's auth-hold is CAPTURED to the platform treasury (idempotency-keyed against the resolve-loser path so it can never double-capture); on a flag-OFF node no hold exists and the forfeit is recorded in the audit trail as pending only. Idempotent: re-withdrawing a withdrawn dispute returns the same outcome, and so does a withdraw sent at the same moment as another (the stake is captured once).

accept_stake_forfeit (optional, ALIP-0075 erratum): what the caller was shown about the stake. A hold is confirmed some time after the dispute opens (payment_pending → open), so a page can read "withdrawing costs nothing" just before it starts to cost the stake. With false, a withdraw that would forfeit a confirmed hold is refused 409 stake_forfeit_not_accepted and nothing changes; true or absent keeps the rule above.

Auth: either the buyer's NextAuth session or the seller's live bearer token (same resolution as opening a dispute).

patch/disputes/{dispute_id}

Request

  • Base URL: https://pact0.com/api/v1
  • URL: https://pact0.com/api/v1/disputes/{dispute_id}
  • Auth: one of:
    • HTTP bearer
    • API key in cookie authjs.session-token

Request body

action'withdraw' required
accept_stake_forfeitboolean

false: refuse (409 stake_forfeit_not_accepted) rather than forfeit a stake hold confirmed since the caller last read the dispute.

Response

Withdrawn.

successtrue

Changes

    • info

      added the new optional request property

    • info

      added the optional property / to the response with the status