List Closed Disputes
Retrieve a paginated list of all closed disputes. Closed disputes include both won disputes (funds returned) and lost disputes (funds forfeited).
API Credentials
Request Parametersโ
Additional - 5 fieldsAdditional Parameters
Responsesโ
200
Successful retrievalReturns a list object containing only closed dispute objects with status "won" or "lost".
Closed disputes characteristics:
status- Either "won" (merchant won) or "lost" (merchant lost)closed_at- ISO 8601 timestamp when dispute was resolvedmessage- Your response message (if provided)documents- Evidence documents submitted- Won disputes: Funds returned to merchant account
- Lost disputes: Funds permanently forfeited to customer
400
Bad requestRequest validation failed. Check the error message for details.
Common causes:
- Invalid date format (must be ISO 8601)
- Limit exceeds maximum (100)
- Invalid order parameter
- Negative offset or limit values
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
Code samplesโ
- cURL
- Ruby
- Python
- Node.js
- PHP
- Java
- C#
- Go
curl https://api.omise.co/disputes/closed \
-u skey_test_5xuy4w91xqz7d1w9u0t: \
-d "limit=20" \
-d "offset=0"
require 'omise'
Omise.api_key = 'skey_test_5xuy4w91xqz7d1w9u0t'
disputes = Omise::Dispute.list_closed({
limit: 20,
offset: 0
})
import omise
omise.api_secret = 'skey_test_5xuy4w91xqz7d1w9u0t'
disputes = omise.Dispute.list_closed(
limit=20,
offset=0
)
const omise = require('omise')({
secretKey: 'skey_test_5xuy4w91xqz7d1w9u0t'
});
const disputes = await omise.disputes.listClosed({
limit: 20,
offset: 0
});
<?php
define('OMISE_SECRET_KEY', 'skey_test_5xuy4w91xqz7d1w9u0t');
$disputes = OmiseDispute::retrieve('/disputes/closed', [
'limit' => 20,
'offset' => 0
]);
Client client = new Client.Builder()
.secretKey("skey_test_5xuy4w91xqz7d1w9u0t")
.build();
ScopedList<Dispute> disputes = client.disputes().listClosed()
.limit(20)
.offset(0)
.send();
var client = new Client("skey_test_5xuy4w91xqz7d1w9u0t");
var disputes = await client.Disputes.GetClosedList(new ListRequest
{
Limit = 20,
Offset = 0
});
client, _ := omise.NewClient(
"pkey_test_5xuy4w91xqz7d1w9u0t",
"skey_test_5xuy4w91xqz7d1w9u0t",
)
disputes, _ := client.ListClosedDisputes(&operations.ListDisputes{
Limit: 20,
Offset: 0,
})
Error and result codesโ
Common Error Codesโ
| Code | Description | Resolution |
|---|---|---|
bad_request | Invalid parameters | Check date format and parameter values |
authentication_failure | Invalid API key | Verify your secret key is correct |
invalid_date_format | Date not in ISO 8601 format | Use YYYY-MM-DDTHH:MM:SSZ format |
Closed Dispute Status Valuesโ
| Status | Description | Financial Impact |
|---|---|---|
won | Merchant won the dispute | Funds returned to merchant account |
lost | Merchant lost the dispute | Funds permanently forfeited to customer |
Try it outโ
Additional - 5 fields