Skip to main content
Version: 2019-05-29 (Current)

Close Dispute

Close a dispute after resolution. This endpoint finalizes a dispute that has been resolved, either through successful defense or after the review process is complete.


Request Parametersโ€‹

Required - 1 fieldRequired Parameters
โ–ผ
`id`STRING(required)
Dispute ID to close (path parameter). The dispute must be in a state that allows closure.
Example:"dspt_test_5xuy4w91xqz7d1w9u0t"
Additional - 1 fieldAdditional Parameters

Responsesโ€‹

200

Dispute closed

Dispute closed successfully. The dispute is now finalized and no further actions can be taken.

After closing:
  • status - Set to final status (won or lost)
  • closed_at - Set to current timestamp
  • If won: Disputed funds are retained by merchant
  • If lost: Disputed funds are returned to customer
  • No further updates can be made to this dispute

400

Bad request

Request validation failed. Check the error message for details.

Common causes:
  • Invalid dispute ID format
  • Invalid status value
  • Missing dispute ID

401

Unauthorized

Authentication failed. Invalid or missing API key.

Common causes:
  • Missing Authorization header
  • Invalid secret key
  • Using public key instead of secret key
  • Incorrect HTTP Basic Auth format

404

Not found

Dispute not found.

Common causes:
  • Incorrect dispute ID
  • Dispute belongs to different account
  • ID typo or formatting error

422

Unprocessable entity

Dispute cannot be closed.

Common causes:
  • Dispute is already closed
  • Dispute status does not allow closure
  • Dispute is still under review and cannot be manually closed

5xx

Server error

Server-side error occurred. These are rare but should be handled gracefully.

How to handle:

Code samplesโ€‹

curl https://api.omise.co/disputes/dspt_test_5xuy4w91xqz7d1w9u0t/close \
-X POST \
-u skey_test_5xuy4w91xqz7d1w9u0t: \
-d "status=won"

Error and result codesโ€‹

Common Error Codesโ€‹

CodeDescriptionResolution
authentication_failureInvalid API keyVerify your secret key is correct
not_foundDispute not foundCheck dispute ID is correct
dispute_already_closedDispute is already closedCannot close an already closed dispute
invalid_dispute_statusDispute status invalidDispute must be in a closeable state

Final Status Valuesโ€‹

StatusDescriptionFinancial Impact
wonMerchant won the disputeFunds retained by merchant
lostMerchant lost the disputeFunds returned to customer

Dispute Resolution Timelineโ€‹

StageDescription
OpenDispute created, awaiting merchant response
PendingResponse submitted, under bank review
Closed (Won/Lost)Final decision made

๐Ÿ”‘API Credentials

Try it outโ€‹

Required - 1 fields
โ–ผ
Additional - 1 fields
Your IP: ...Loading...