> This page is for Afterpay Online Developer, version Main (default).
> For other versions, use one of these documentation indexes:
> - Main (default): https://developers.afterpay.com/afterpay-online-developer/main/llms.txt
> - v1: https://developers.afterpay.com/afterpay-online-developer/v-1/llms.txt
> - Chinese: https://developers.afterpay.com/afterpay-online-developer/chinese/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.afterpay.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.afterpay.com/_mcp/server.

# Receive Dispute

GET https://global-api-sandbox.afterpay.com/v2/disputes/{dispute_id}

Get detailed information about a dispute.

Reference: https://developers.afterpay.com/afterpay-online-developer/api-reference/reference/disputes/receive-dispute

## Authentication

- `Authorization` header (basic auth, required) — Basic authentication of the form `Basic <base64(username:password)>`.

## Servers

- `https://global-api-sandbox.afterpay.com` (Sandbox, default)
- `https://global-api.afterpay.com` (Production)

## Request

### Path parameters

- `dispute_id` (string, required)

### Headers

- `Accept` ("application/json", required) — application/json

## Response

### 200

Success

- `id` (string, required) — Dispute identifier
- `order` (string, required) — The token of the order that the dispute is for.
- `amount` (string, required) — The amount of the dispute
- `currency` (string, required) — The ISO 4217 currency code of the dispute.
- `reason` (enum, required) — The reason for the dispute.
  - Allowed values: `product_not_received`, `product_unacceptable`, `credit_not_processed`, `order_canceled`, `duplicate`, `incorrect_amount`, `paid_by_other_means`, `fraudulent`, `fraudulent_merchant`
- `status` (enum, required) — The current state of the dispute. Values depend on how the dispute state machine is modeled.
  - Allowed values: `needs_response`, `under_review`, `won`, `lost`, `merchant_refunded`, `merchant_voided`
- `open` (boolean, required, default: true) — `True` if a final decision on the dispute hasn't been made yet.
- `responseDueBy` (integer, required) — Deadline by which the merchant must respond to the dispute. (Epoch timestamp in seconds, timezone UTC +0.00)
- `createdAt` (integer, required) — A timestamp indicating when the dispute was created. (Epoch timestamp in seconds, timezone UTC +0.00)
- `openingNote` (string, required) — Text from the customer describing why the dispute was opened or the reason for the complaint. While dispute category codes are helpful at informing what a merchant should present, it doesn’t provide reasoning behind the customer’s complaint. In some cases, this can help merchants troubleshoot the dispute directly with their customers.
- `openingNoteAttachments` (list of string, optional) — Attachments to supplement the `openingNote` if the customer provided photos or screenshots as part of their dispute description.
- `updatedAt` (integer, optional) — Timestamp when the dispute was updated. (Epoch timestamp in seconds, timezone UTC +0.00)
- `closingReason` (enum, optional) — A reason indicating how the final decision on the dispute was reached. Recommended possible values listed in Closing Reasons.
  - Allowed values: `merchant_accepted`, `evidence_accepted`, `evidence_rejected`, `deadline_expired`, `customer_cancelled`
- `closingNote` (string, optional) — Text describing in detail how the final decision on the dispute was reached. This supplements the `closingReason`.
- `merchantOrderId` (string, optional) — The identifier for the transaction on the merchant side.
- `transactionDate` (integer, optional) — The timestamp of the order created by the customer. (Epoch timestamp in seconds, timezone UTC +0.00)
- `settlementAmount` (string, optional) — The settlementAmount for audit usage.
- `partialRefundAmount` (string, optional) — The amount partially refunded for the disputed order, if applicable.
- `meta` (Meta, optional) — The extra information for merchants to match payment.

## Types

### Meta

- `transactionAmount` (string, required) — The transaction amount for the order.
- `orderType` (string, required) — The type of order. `ONLINE` or `INSTORE`
- `network` (string, optional) — The payment network used by the customer. (For example, `Visa` or `MasterCard`)
- `networkReferenceId` (string, optional) — The identifier for the payment.

## Examples

**Response**

```json
{
  "id": "dp_N64jYg4RC4ZBUsXjLzE3W5",
  "order": "123456789",
  "amount": "48.46",
  "currency": "AUD",
  "reason": "product_not_received",
  "status": "needs_response",
  "open": true,
  "responseDueBy": 1691884800,
  "createdAt": 1691880800,
  "openingNote": "Customer has no knowledge of the payment",
  "openingNoteAttachments": [
    "fi_48vmw3sXdVqvtJGXbgKbAZ"
  ],
  "updatedAt": 1691884000,
  "closingReason": "merchant_accepted",
  "closingNote": "Merchant accepted the dispute",
  "merchantOrderId": "order54321",
  "transactionDate": 1691882800,
  "settlementAmount": "48.46",
  "partialRefundAmount": "partialRefundAmount",
  "meta": {
    "transactionAmount": "48.46",
    "orderType": "ONLINE",
    "network": "Visa",
    "networkReferenceId": "networkReferenceId"
  }
}
```

**SDK Code**

```python
import requests

url = "https://global-api-sandbox.afterpay.com/v2/disputes/dispute_id"

headers = {
    "Accept": "application/json"
}

response = requests.get(url, headers=headers, auth=("<username>", "<password>"))

print(response.json())
```

```javascript
const url = 'https://global-api-sandbox.afterpay.com/v2/disputes/dispute_id';
const credentials = btoa("<username>:<password>");

const options = {
  method: 'GET',
  headers: {Accept: 'application/json', Authorization: `Basic ${credentials}`}
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://global-api-sandbox.afterpay.com/v2/disputes/dispute_id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Accept", "application/json")
	req.SetBasicAuth("<username>", "<password>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://global-api-sandbox.afterpay.com/v2/disputes/dispute_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Accept"] = 'application/json'
request.basic_auth("<username>", "<password>")

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://global-api-sandbox.afterpay.com/v2/disputes/dispute_id")
  .header("Accept", "application/json")
  .basicAuth("<username>", "<password>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://global-api-sandbox.afterpay.com/v2/disputes/dispute_id', [
  'headers' => [
    'Accept' => 'application/json',
  ],
    'auth' => ['<username>', '<password>'],
]);

echo $response->getBody();
```

```csharp
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://global-api-sandbox.afterpay.com/v2/disputes/dispute_id");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "application/json");

IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = [
  "Accept": "application/json",
  "Authorization": "Basic \(credentials)"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://global-api-sandbox.afterpay.com/v2/disputes/dispute_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```