Accept Dispute
Accept a dispute to concede to the customer's claim. This action is irreversible and immediately closes the dispute with status "lost". The disputed amount will be returned to the customer.
Request Parametersโ
Required - 1 fieldRequired Parameters
`id`STRING(required)
Dispute ID to accept (path parameter). The dispute must have status "open" or "pending".
Responsesโ
200
Dispute acceptedDispute accepted successfully. The dispute status is now "lost" and the process is complete.
After accepting:
status- Changes to "lost"closed_at- Set to current timestamp- Disputed amount is returned to the customer
- This action is irreversible
- No further updates can be made to this dispute
400
Bad requestRequest validation failed. Check the error message for details.
Common causes:
- Invalid dispute ID format
- Missing dispute ID
401
UnauthorizedAuthentication 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 foundDispute not found.
Common causes:
- Incorrect dispute ID
- Dispute belongs to different account
- ID typo or formatting error
422
Unprocessable entityDispute cannot be accepted.
Common causes:
- Dispute is already closed (won or lost)
- Dispute status does not allow acceptance
- Acceptance deadline has passed
5xx
Server errorServer-side error occurred. These are rare but should be handled gracefully.
How to handle:
- Retry the request with exponential backoff
- Check status.omise.co for service incidents
- See Error Handling for detailed guidance
Code samplesโ
- cURL
- Ruby
- Python
- Node.js
- PHP
- Java
- C#
- Go
curl https://api.omise.co/disputes/dspt_test_5xuy4w91xqz7d1w9u0t/accept \
-X POST \
-u skey_test_5xuy4w91xqz7d1w9u0t:
require 'omise'
Omise.api_key = 'skey_test_5xuy4w91xqz7d1w9u0t'
dispute = Omise::Dispute.accept('dspt_test_5xuy4w91xqz7d1w9u0t')
import omise
omise.api_secret = 'skey_test_5xuy4w91xqz7d1w9u0t'
dispute = omise.Dispute.accept('dspt_test_5xuy4w91xqz7d1w9u0t')
const omise = require('omise')({
secretKey: 'skey_test_5xuy4w91xqz7d1w9u0t'
});
const dispute = await omise.disputes.accept('dspt_test_5xuy4w91xqz7d1w9u0t');
<?php
define('OMISE_SECRET_KEY', 'skey_test_5xuy4w91xqz7d1w9u0t');
$dispute = OmiseDispute::accept('dspt_test_5xuy4w91xqz7d1w9u0t');
Client client = new Client.Builder()
.secretKey("skey_test_5xuy4w91xqz7d1w9u0t")
.build();
Dispute dispute = client.disputes().accept("dspt_test_5xuy4w91xqz7d1w9u0t");
var client = new Client("skey_test_5xuy4w91xqz7d1w9u0t");
var dispute = await client.Disputes.Accept("dspt_test_5xuy4w91xqz7d1w9u0t");
client, _ := omise.NewClient(
"pkey_test_5xuy4w91xqz7d1w9u0t",
"skey_test_5xuy4w91xqz7d1w9u0t",
)
dispute, _ := client.AcceptDispute("dspt_test_5xuy4w91xqz7d1w9u0t")
Error and result codesโ
Common Error Codesโ
| Code | Description | Resolution |
|---|---|---|
authentication_failure | Invalid API key | Verify your secret key is correct |
not_found | Dispute not found | Check dispute ID is correct |
dispute_already_closed | Dispute is already closed | Cannot accept a closed dispute |
invalid_dispute_status | Dispute status invalid | Only open or pending disputes can be accepted |
Status Transitionโ
| Before | After | Result |
|---|---|---|
open | lost | Dispute accepted, funds returned to customer |
pending | lost | Dispute accepted, funds returned to customer |
When to Accept a Disputeโ
Consider accepting a dispute when:
- You cannot provide sufficient evidence to contest the claim
- The customer's claim is legitimate
- The cost of fighting exceeds the disputed amount
- You want to resolve quickly and maintain customer goodwill
API Credentials
Try it outโ
Required - 1 fields
Your IP:
...Loading...