# Retrieve A Dispute

> For the complete machine-readable documentation index, see [llms.txt](https://apidocs.chargebee.com/llms.txt).


Retrieves a dispute identified by its unique id.

Use this operation to check the current [`status`](/docs/api/disputes/dispute-object#status) of a dispute, the amount under dispute, and the transaction and customer it relates to. To find disputes when you don't have the dispute id, use the [List disputes](/docs/api/disputes/list-disputes) operation.

## Sample Request

#### cURL

```bash
curl  https://{site}.chargebee.com/api/v2/disputes/dspt___test__KyVnHhSBWmDspt1 \
     -u {site_api_key}:
```

#### .NET

```dotnet
using ChargeBee.Api;
using ChargeBee.Models;

ApiConfig.Configure("{site}","{site_api_key}");
EntityResult result = Dispute.Retrieve("dspt___test__KyVnHhSBWmDspt1").Request();

Dispute dispute = result.Dispute;
```

#### Go

```go
package main
import (
    "fmt"
    "github.com/chargebee/chargebee-go/v3"
    disputeAction "github.com/chargebee/chargebee-go/v3/actions/dispute"
)
func main() {
    chargebee.Configure("{site_api_key}","{site}");
    res,err := disputeAction.Retrieve("dspt___test__KyVnHhSBWmDspt1").Request()
    if err != nil {
        fmt.Println(err)
    } else {
        Dispute := res.Dispute
    }
}
```

#### Go

```go
package main

import (
  "fmt"
  "github.com/chargebee/chargebee-go/v4"
)

func main() {
  config := &chargebee.ClientConfig{
    SiteName: "{site}",
    ApiKey: "{site_api_key}",
  }    
  client := chargebee.NewClient(config)
  req := &chargebee.DisputeRetrieveRequest{
    Id : "dspt___test__KyVnHhSBWmDspt1",
}
  res, err := client.Dispute.Retrieve(req)
      if err != nil {
        fmt.Println(err)
    } else {
        Dispute := res.Dispute
    }
}
```

#### Java

```java
import com.chargebee.*;
import com.chargebee.ListResult;
import com.chargebee.models.*;
import com.chargebee.models.enums.*;
import java.io.IOException;

public class Sample {

    public static void main(String args[]) throws IOException, Exception {
        Environment.configure("{site}", "{site_api_key}");
        Result result = Dispute.retrieve("dspt___test__KyVnHhSBWmDspt1").request();

        Dispute dispute = result.dispute();
    }
}
```

#### Java

```java
import com.chargebee.v4.client.ChargebeeClient;
import com.chargebee.v4.models.dispute.Dispute;
import com.chargebee.v4.models.dispute.params.DisputeRetrieveParams;
import com.chargebee.v4.models.dispute.responses.DisputeRetrieveResponse;

public class DisputeRetrieve {

    public static void main(String[] args) {
        ChargebeeClient client = ChargebeeClient.builder()
            .apiKey("{site_api_key}")
            .siteName("{site}")
            .build();

        DisputeRetrieveResponse response = client.disputes().retrieve("dspt___test__KyVnHhSBWmDspt1");

        Dispute dispute = response.getDispute();
    }
}
```

#### Node.js

```node
import Chargebee from "chargebee";

const chargebee = new Chargebee({
    site: "{site}",
    apiKey: "{site_api_key}",
});

try {
    const result = await chargebee.dispute.retrieve("dspt___test__KyVnHhSBWmDspt1");

    console.log(result);
    const dispute = result.dispute;
} catch (err) {
    console.log(err);
}
```

#### PHP

```php
<?php

require __DIR__ . '/vendor/autoload.php';

use Chargebee\ChargebeeClient;

$chargebee = new ChargebeeClient(options: [
    "site" => "{site}",
    "apiKey" => "{site_api_key}",
]);
$result = $chargebee->dispute()->retrieve("dspt___test__KyVnHhSBWmDspt1");
$dispute = $result->dispute;
```

#### Python

```python
from chargebee import Chargebee

cb_client = Chargebee(api_key="{site_api_key}", site="{site}")
response = cb_client.Dispute.retrieve("dspt___test__KyVnHhSBWmDspt1")
dispute = response.dispute
```

#### Ruby

```ruby
require 'chargebee'

ChargeBee.configure(:site => "{site}",
  :api_key => "{site_api_key}")

result = ChargeBee::Dispute.retrieve("dspt___test__KyVnHhSBWmDspt1")

dispute = result.dispute
```

## Sample Response

```json
{
  "dispute": {
    "id": "dspt___test__KyVnHhSBWmDspt1",
    "customer_id": "__test__KyVnHhSBWlwxY2qJ",
    "transaction_id": "txn___test__KyVnHhSBWlxBX2qV",
    "gateway_account_id": "gw___test__KyVnGlSBWltEk29Z",
    "id_at_gateway": "cb___test__KyVnHhSBWlv4q2pU",
    "currency_code": "USD",
    "amount": 1200,
    "reason": "fraudulent",
    "status": "initiated",
    "type": "chargeback",
    "is_partial_dispute": false,
    "created_at": 1517505929,
    "resource_version": 1517505929000,
    "updated_at": 1517505929,
    "object": "dispute"
  }
}
```

## URL Format

**GET** https://[site].chargebee.com/api/v2/disputes/{dispute-id}

## Returns

- `dispute` (Dispute object)
  Resource object representing dispute
