> This page is for Afterpay.

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

# Retrieve Dispute

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

List disputes within a date range based on certain criteria. This endpoint can be used for debugging or synchronizing the disputes from Afterpay if/when you are unable to use the webhook method.

Reference: https://developers.cash.app/afterpay/api-reference/reference/disputes/retrieve-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

### Query parameters

- `order` (integer, optional) — Payment or Order token using which you can filter the list.
- `merchant` (string, optional) — Merchant token using which you can filter the list.
- `status` (string, optional) — Dispute status using which you can filter the list.
- `openedAfter` (datetime, optional) — Filter disputes that were created on or after this timestamp (inclusive).
- `openedBefore` (datetime, optional) — Filter disputes that were created on or before this timestamp (inclusive).
- `offset` (integer, optional) — Offset for the search results.
- `limit` (integer, optional) — The maximum number of records that you want returned from this request.

### Headers

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

## Response

### 200

Success

- `data` (list of dispute, optional) — An array of dispute objects that match the filter criteria in the request.
- `offset` (integer, optional)
- `limit` (integer, optional)
- `total` (integer, optional)

## Types

### dispute

Dispute object

- `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.
- `closingReason` (enum, required, nullable) — 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`
- `merchantOrderId` (string, required, nullable) — The identifier for the transaction on the merchant side.
- `transactionDate` (integer, required, nullable) — The timestamp of the order created by the customer. (Epoch timestamp in seconds, timezone UTC +0.00)
- `settlementAmount` (string, required, nullable) — The settlementAmount for audit usage.
- `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, nullable) — Timestamp when the dispute was updated. (Epoch timestamp in seconds, timezone UTC +0.00)
- `closingNote` (string, optional, nullable) — Text describing in detail how the final decision on the dispute was reached. This supplements the `closingReason`.
- `partialRefundAmount` (string, optional, nullable) — The amount partially refunded for the disputed order, if applicable.
- `meta` (meta, optional) — The extra information for merchants to match payment.

### 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
{
  "data": [
    {
      "id": "dp_N64jYg4RC4ZBUsXjLzE3W5",
      "order": "123456789",
      "amount": "48.46",
      "currency": "USD",
      "reason": "product_not_received",
      "status": "needs_response",
      "open": true,
      "responseDueBy": 1691884800,
      "createdAt": 1691880800,
      "openingNote": "Customer has no knowledge of the payment",
      "closingReason": "merchant_accepted",
      "merchantOrderId": "order54321",
      "transactionDate": 1691882800,
      "settlementAmount": "48.46",
      "openingNoteAttachments": [
        "fi_48vmw3sXdVqvtJGXbgKbAZ"
      ],
      "updatedAt": 1691884000,
      "closingNote": "Merchant accepted the dispute",
      "partialRefundAmount": "partialRefundAmount",
      "meta": {
        "transactionAmount": "48.46",
        "orderType": "ONLINE",
        "network": "Visa"
      }
    }
  ],
  "offset": 0,
  "limit": 1,
  "total": 1
}
```

**SDK Code**

```python
import requests

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

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';
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"

	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")

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")
  .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', [
  '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");
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")! 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()
```