Retrieve a Dispute
Retrieve detailed information about a specific dispute including status, reason codes, evidence documents, and associated charge.
API Credentials
Request Parametersโ
Required - 1 fieldRequired Parameters
`id`STRING(required)
Dispute ID to retrieve (path parameter). Format: dspt_test_ or dspt_live_ followed by alphanumeric string.
Responsesโ
200
Successful retrievalReturns the dispute object with complete details including status, documents, and transaction information.
Response includes:
id- Dispute IDstatus- Current status (open, pending, won, lost)amount- Disputed amount in smallest currency unitcurrency- Three-letter ISO currency codereason_code- Reason for dispute (fraudulent, unrecognized, etc.)reason_message- Human-readable reason descriptioncharge- Associated charge IDmessage- Your response message (if provided)documents- List of uploaded evidence documentscreated_at- When dispute was createdclosed_at- When dispute was closed (null if open/pending)
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
Code samplesโ
- cURL
- Ruby
- Python
- Node.js
- PHP
- Java
- C#
- Go
curl https://api.omise.co/disputes/dspt_test_5xuy4w91xqz7d1w9u0t \
-u skey_test_5xuy4w91xqz7d1w9u0t:
require 'omise'
Omise.api_key = 'skey_test_5xuy4w91xqz7d1w9u0t'
dispute = Omise::Dispute.retrieve('dspt_test_5xuy4w91xqz7d1w9u0t')
import omise
omise.api_secret = 'skey_test_5xuy4w91xqz7d1w9u0t'
dispute = omise.Dispute.retrieve('dspt_test_5xuy4w91xqz7d1w9u0t')
const omise = require('omise')({
secretKey: 'skey_test_5xuy4w91xqz7d1w9u0t'
});
const dispute = await omise.disputes.retrieve('dspt_test_5xuy4w91xqz7d1w9u0t');
<?php
define('OMISE_SECRET_KEY', 'skey_test_5xuy4w91xqz7d1w9u0t');
$dispute = OmiseDispute::retrieve('dspt_test_5xuy4w91xqz7d1w9u0t');
Client client = new Client.Builder()
.secretKey("skey_test_5xuy4w91xqz7d1w9u0t")
.build();
Dispute dispute = client.disputes().get("dspt_test_5xuy4w91xqz7d1w9u0t");
var client = new Client("skey_test_5xuy4w91xqz7d1w9u0t");
var dispute = await client.Disputes.Get("dspt_test_5xuy4w91xqz7d1w9u0t");
client, _ := omise.NewClient(
"pkey_test_5xuy4w91xqz7d1w9u0t",
"skey_test_5xuy4w91xqz7d1w9u0t",
)
dispute, _ := client.GetDispute("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 |
invalid_dispute_id | Dispute ID format invalid | Use valid dspt_ format |
Dispute Status Valuesโ
| Status | Description |
|---|---|
open | Newly initiated, awaiting your response |
pending | Under review with merchant response submitted |
won | Merchant won the dispute |
lost | Merchant lost the dispute |
Reason Codesโ
| Code | Description |
|---|---|
fraudulent | Customer claims unauthorized transaction |
unrecognized | Customer doesn't recognize the charge |
duplicate | Customer claims duplicate charge |
goods_or_services_not_provided | Product/service not received |
not_as_described | Product significantly different from description |
credit_not_processed | Refund promised but not received |
general | Other reasons |
Try it outโ
Required - 1 fields