Method-by-method reference for sdk.disputes — opening, listing, assigning, and resolving disputes on OFFER-HUB orders.
sdk.disputes handles disagreement workflows between buyers and sellers. Disputes freeze an order's financial operations until they are resolved, and the resolution decision controls where the escrowed funds go.
A Dispute object contains:
Dispute states in the SDK type surface are OPEN, UNDER_REVIEW, and RESOLVED. The dispute status is independent of the order status — opening a dispute moves the order to DISPUTED and blocks release/refund until the dispute is resolved.
sdk.disputes.open(orderId, data) → POST /orders/{orderId}/resolution/dispute
Creates a dispute and moves the order to DISPUTED.
Preconditions:
IN_PROGRESSIN_PROGRESS)Possible errors:
400 — order not in IN_PROGRESS (INVALID_STATE)404 — order not found (ORDER_NOT_FOUND)409 — an active dispute already exists on the order (DISPUTE_ALREADY_OPEN)sdk.disputes.list(params?) → GET /disputes
Returns a flat list of disputes. Unlike orders, this endpoint is not paginated.
Possible errors:
status, openedBy), as unknown values will simply match nothing or fail the querysdk.disputes.get(disputeId) → GET /disputes/{disputeId}
Returns the dispute with its order relation included.
Possible errors:
404 — dispute not found (DISPUTE_NOT_FOUND)sdk.disputes.assign(disputeId, data) → POST /disputes/{disputeId}/assign
Assigns the dispute to a support agent and moves it to UNDER_REVIEW.
Preconditions:
OPENPossible errors:
400 — dispute is not in OPEN (INVALID_STATE)404 — dispute not found (DISPUTE_NOT_FOUND)sdk.disputes.resolve(disputeId, data) → POST /disputes/{disputeId}/resolve
Closes the dispute with a financial decision.
Preconditions:
UNDER_REVIEWSPLIT: both releaseAmount and refundAmount are required and must sum exactly to the order amountThe SPLIT amounts are validated against the order amount. If releaseAmount + refundAmount does not equal the order total, the Orchestrator rejects the resolution.
On resolution the underlying order is settled and closed: FULL_RELEASE runs the escrow release flow, FULL_REFUND runs the escrow refund flow, and SPLIT distributes the escrow to both parties through a single dispute resolution transaction and credits both balances.
Possible errors:
400 — dispute not in UNDER_REVIEW (INVALID_STATE)404 — dispute not found (DISPUTE_NOT_FOUND)422 — missing SPLIT amounts or amounts that do not sum to the order amount (INVALID_AMOUNT)All methods throw typed SDK errors. The most relevant for disputes:
All behavior on this page was verified against the orchestrator repository (OFFER-HUB/OFFER-HUB), not inferred:
packages/sdk/src/resources/disputes.tsapps/api/src/modules/disputes/disputes.controller.ts, apps/api/src/modules/resolution/resolution.controller.tsapps/api/src/modules/resolution/resolution.service.tsapps/api/src/modules/resolution/dto/open-dispute.dto.ts, apps/api/src/modules/resolution/dto/assign-dispute.dto.ts, apps/api/src/modules/resolution/dto/resolve-dispute.dto.tspackages/shared/src/enums/dispute-status.enum.tssdk.orders method referencesdk.withdrawals method referenceDISPUTE_OPENED, DISPUTE_UNDER_REVIEW, DISPUTE_RESOLVED event payloads