> 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.

# Respond to Dispute

POST https://global-api-sandbox.afterpay.com/v2/disputes/{dispute_id}
Content-Type: application/json

The Respond to the Dispute endpoint allows a merchant to submit evidence for the dispute. This is only allowed if the dispute is the state `needs_response`.

Evidence fields are submitted directly in the request body alongside the dispute `id`. At least one evidence field must be provided.

A successful response submits the merchant's challenge immediately and changes the dispute status to `under_review`. There is no separate finalize step.

Merchants only have one opportunity to submit evidence. Once a 200 response is received, this information cannot be updated or changed.

Reference: https://developers.afterpay.com/afterpay-online-developer/api-reference/reference/disputes/respond-to-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` (string, optional) — application/json

### Body (application/json)

This endpoint expects an object.

- `id` (string, optional) — A unique ID given to a dispute.
- `productDescription` (string, optional) — A description of the product or service and any relevant details on how this was presented to the customer at the time of purchase.
- `refundPolicy` (string, optional) — Token of the file upload. The merchant's refund policy, as shown or provided to the customer.
- `refundPolicyDisclosure` (string, optional) — An explanation of how and when the customer was shown or provided with the merchant's refund policy prior to purchase.
- `refundRefusalExplanation` (string, optional) — The merchant's explanation for why the customer is not entitled to a refund.
- `shippingDocumentation` (string, optional) — Token of the file upload. A shipping label or receipt for the disputed payment.
- `shippingAddress` (string, optional) — The address to which a physical product was shipped.
- `shippingDate` (string, optional) — In cases of physical products, the date that a physical product began its route to the shipping address in a clear human-readable format. This date should be prior to the date of the dispute.
- `shippingCarrier` (string, optional) — In cases of physical products, the delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, separate them with commas.
- `shippingTrackingNumber` (string, optional) — The tracking number for a physical product, obtained from the delivery service.
- `uncategorizedFile` (string, optional) — Token of the file upload. Additional file that's not in any of the categories above.
- `uncategorizedText` (string, optional) — Any additional text deemed relevant by the merchant.

## Response

### 200

When successful, returns the updated 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.
- `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` (object, optional) — The extra information for merchants to match payment.
  - `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

### Submit shipping evidence

**Request**

```json
{
  "productDescription": "Women's running shoes, size 8, ordered on 2023-08-01",
  "shippingDocumentation": "fi_7wvZBQqWzoPGLxvaMkpTjX",
  "shippingAddress": "123 Main St, Melbourne VIC 3000, AU",
  "shippingDate": "2023-08-02",
  "shippingCarrier": "Australia Post",
  "shippingTrackingNumber": "AP123456789AU"
}
```

**Response**

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

**SDK Code**

```python Submit shipping evidence
import requests

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

payload = {
    "productDescription": "Women's running shoes, size 8, ordered on 2023-08-01",
    "shippingDocumentation": "fi_7wvZBQqWzoPGLxvaMkpTjX",
    "shippingAddress": "123 Main St, Melbourne VIC 3000, AU",
    "shippingDate": "2023-08-02",
    "shippingCarrier": "Australia Post",
    "shippingTrackingNumber": "AP123456789AU"
}
headers = {
    "Accept": "Accept"
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers, auth=("<username>", "<password>"))

print(response.json())
```

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

const options = {
  method: 'POST',
  headers: {
    Accept: 'Accept',
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/json'
  },
  body: '{"productDescription":"Women\'s running shoes, size 8, ordered on 2023-08-01","shippingDocumentation":"fi_7wvZBQqWzoPGLxvaMkpTjX","shippingAddress":"123 Main St, Melbourne VIC 3000, AU","shippingDate":"2023-08-02","shippingCarrier":"Australia Post","shippingTrackingNumber":"AP123456789AU"}'
};

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

```go Submit shipping evidence
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"productDescription\": \"Women's running shoes, size 8, ordered on 2023-08-01\",\n  \"shippingDocumentation\": \"fi_7wvZBQqWzoPGLxvaMkpTjX\",\n  \"shippingAddress\": \"123 Main St, Melbourne VIC 3000, AU\",\n  \"shippingDate\": \"2023-08-02\",\n  \"shippingCarrier\": \"Australia Post\",\n  \"shippingTrackingNumber\": \"AP123456789AU\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

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

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

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

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

}
```

```ruby Submit shipping evidence
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::Post.new(url)
request["Accept"] = 'Accept'
request.basic_auth("<username>", "<password>")
request["Content-Type"] = 'application/json'
request.body = "{\n  \"productDescription\": \"Women's running shoes, size 8, ordered on 2023-08-01\",\n  \"shippingDocumentation\": \"fi_7wvZBQqWzoPGLxvaMkpTjX\",\n  \"shippingAddress\": \"123 Main St, Melbourne VIC 3000, AU\",\n  \"shippingDate\": \"2023-08-02\",\n  \"shippingCarrier\": \"Australia Post\",\n  \"shippingTrackingNumber\": \"AP123456789AU\"\n}"

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

```java Submit shipping evidence
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://global-api-sandbox.afterpay.com/v2/disputes/dispute_id")
  .header("Accept", "Accept")
  .basicAuth("<username>", "<password>")
  .header("Content-Type", "application/json")
  .body("{\n  \"productDescription\": \"Women's running shoes, size 8, ordered on 2023-08-01\",\n  \"shippingDocumentation\": \"fi_7wvZBQqWzoPGLxvaMkpTjX\",\n  \"shippingAddress\": \"123 Main St, Melbourne VIC 3000, AU\",\n  \"shippingDate\": \"2023-08-02\",\n  \"shippingCarrier\": \"Australia Post\",\n  \"shippingTrackingNumber\": \"AP123456789AU\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://global-api-sandbox.afterpay.com/v2/disputes/dispute_id', [
  'body' => '{
  "productDescription": "Women\'s running shoes, size 8, ordered on 2023-08-01",
  "shippingDocumentation": "fi_7wvZBQqWzoPGLxvaMkpTjX",
  "shippingAddress": "123 Main St, Melbourne VIC 3000, AU",
  "shippingDate": "2023-08-02",
  "shippingCarrier": "Australia Post",
  "shippingTrackingNumber": "AP123456789AU"
}',
  'headers' => [
    'Accept' => 'Accept',
    'Content-Type' => 'application/json',
  ],
    'auth' => ['<username>', '<password>'],
]);

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

```csharp Submit shipping evidence
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.POST);
request.AddHeader("Accept", "Accept");

request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"productDescription\": \"Women's running shoes, size 8, ordered on 2023-08-01\",\n  \"shippingDocumentation\": \"fi_7wvZBQqWzoPGLxvaMkpTjX\",\n  \"shippingAddress\": \"123 Main St, Melbourne VIC 3000, AU\",\n  \"shippingDate\": \"2023-08-02\",\n  \"shippingCarrier\": \"Australia Post\",\n  \"shippingTrackingNumber\": \"AP123456789AU\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Submit shipping evidence
import Foundation

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

let headers = [
  "Accept": "Accept",
  "Authorization": "Basic \(credentials)",
  "Content-Type": "application/json"
]
let parameters = [
  "productDescription": "Women's running shoes, size 8, ordered on 2023-08-01",
  "shippingDocumentation": "fi_7wvZBQqWzoPGLxvaMkpTjX",
  "shippingAddress": "123 Main St, Melbourne VIC 3000, AU",
  "shippingDate": "2023-08-02",
  "shippingCarrier": "Australia Post",
  "shippingTrackingNumber": "AP123456789AU"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

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 = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```

### Submit refund policy evidence

**Request**

```json
{
  "productDescription": "12-month digital subscription plan",
  "refundPolicy": "fi_48vmw3sXdVqvtJGXbgKbAZ",
  "refundPolicyDisclosure": "Refund policy was displayed on the checkout page and included in the order confirmation email sent on 2023-07-15.",
  "refundRefusalExplanation": "The customer used the service for 3 months before filing the dispute. Per our policy, digital subscriptions are non-refundable after 14 days."
}
```

**Response**

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

**SDK Code**

```python Submit refund policy evidence
import requests

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

payload = {
    "productDescription": "12-month digital subscription plan",
    "refundPolicy": "fi_48vmw3sXdVqvtJGXbgKbAZ",
    "refundPolicyDisclosure": "Refund policy was displayed on the checkout page and included in the order confirmation email sent on 2023-07-15.",
    "refundRefusalExplanation": "The customer used the service for 3 months before filing the dispute. Per our policy, digital subscriptions are non-refundable after 14 days."
}
headers = {
    "Accept": "Accept"
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers, auth=("<username>", "<password>"))

print(response.json())
```

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

const options = {
  method: 'POST',
  headers: {
    Accept: 'Accept',
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/json'
  },
  body: '{"productDescription":"12-month digital subscription plan","refundPolicy":"fi_48vmw3sXdVqvtJGXbgKbAZ","refundPolicyDisclosure":"Refund policy was displayed on the checkout page and included in the order confirmation email sent on 2023-07-15.","refundRefusalExplanation":"The customer used the service for 3 months before filing the dispute. Per our policy, digital subscriptions are non-refundable after 14 days."}'
};

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

```go Submit refund policy evidence
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"productDescription\": \"12-month digital subscription plan\",\n  \"refundPolicy\": \"fi_48vmw3sXdVqvtJGXbgKbAZ\",\n  \"refundPolicyDisclosure\": \"Refund policy was displayed on the checkout page and included in the order confirmation email sent on 2023-07-15.\",\n  \"refundRefusalExplanation\": \"The customer used the service for 3 months before filing the dispute. Per our policy, digital subscriptions are non-refundable after 14 days.\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

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

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

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

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

}
```

```ruby Submit refund policy evidence
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::Post.new(url)
request["Accept"] = 'Accept'
request.basic_auth("<username>", "<password>")
request["Content-Type"] = 'application/json'
request.body = "{\n  \"productDescription\": \"12-month digital subscription plan\",\n  \"refundPolicy\": \"fi_48vmw3sXdVqvtJGXbgKbAZ\",\n  \"refundPolicyDisclosure\": \"Refund policy was displayed on the checkout page and included in the order confirmation email sent on 2023-07-15.\",\n  \"refundRefusalExplanation\": \"The customer used the service for 3 months before filing the dispute. Per our policy, digital subscriptions are non-refundable after 14 days.\"\n}"

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

```java Submit refund policy evidence
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://global-api-sandbox.afterpay.com/v2/disputes/dispute_id")
  .header("Accept", "Accept")
  .basicAuth("<username>", "<password>")
  .header("Content-Type", "application/json")
  .body("{\n  \"productDescription\": \"12-month digital subscription plan\",\n  \"refundPolicy\": \"fi_48vmw3sXdVqvtJGXbgKbAZ\",\n  \"refundPolicyDisclosure\": \"Refund policy was displayed on the checkout page and included in the order confirmation email sent on 2023-07-15.\",\n  \"refundRefusalExplanation\": \"The customer used the service for 3 months before filing the dispute. Per our policy, digital subscriptions are non-refundable after 14 days.\"\n}")
  .asString();
```

```php Submit refund policy evidence
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://global-api-sandbox.afterpay.com/v2/disputes/dispute_id', [
  'body' => '{
  "productDescription": "12-month digital subscription plan",
  "refundPolicy": "fi_48vmw3sXdVqvtJGXbgKbAZ",
  "refundPolicyDisclosure": "Refund policy was displayed on the checkout page and included in the order confirmation email sent on 2023-07-15.",
  "refundRefusalExplanation": "The customer used the service for 3 months before filing the dispute. Per our policy, digital subscriptions are non-refundable after 14 days."
}',
  'headers' => [
    'Accept' => 'Accept',
    'Content-Type' => 'application/json',
  ],
    'auth' => ['<username>', '<password>'],
]);

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

```csharp Submit refund policy evidence
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.POST);
request.AddHeader("Accept", "Accept");

request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"productDescription\": \"12-month digital subscription plan\",\n  \"refundPolicy\": \"fi_48vmw3sXdVqvtJGXbgKbAZ\",\n  \"refundPolicyDisclosure\": \"Refund policy was displayed on the checkout page and included in the order confirmation email sent on 2023-07-15.\",\n  \"refundRefusalExplanation\": \"The customer used the service for 3 months before filing the dispute. Per our policy, digital subscriptions are non-refundable after 14 days.\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Submit refund policy evidence
import Foundation

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

let headers = [
  "Accept": "Accept",
  "Authorization": "Basic \(credentials)",
  "Content-Type": "application/json"
]
let parameters = [
  "productDescription": "12-month digital subscription plan",
  "refundPolicy": "fi_48vmw3sXdVqvtJGXbgKbAZ",
  "refundPolicyDisclosure": "Refund policy was displayed on the checkout page and included in the order confirmation email sent on 2023-07-15.",
  "refundRefusalExplanation": "The customer used the service for 3 months before filing the dispute. Per our policy, digital subscriptions are non-refundable after 14 days."
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

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 = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```

### Submit uncategorized evidence

**Request**

```json
{
  "uncategorizedFile": "fi_9xKmPqRsTuVwXyZaBcDeFg",
  "uncategorizedText": "Customer confirmed receipt of the item via email on 2023-08-10. Attaching the email screenshot."
}
```

**Response**

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

**SDK Code**

```python Submit uncategorized evidence
import requests

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

payload = {
    "uncategorizedFile": "fi_9xKmPqRsTuVwXyZaBcDeFg",
    "uncategorizedText": "Customer confirmed receipt of the item via email on 2023-08-10. Attaching the email screenshot."
}
headers = {
    "Accept": "Accept"
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers, auth=("<username>", "<password>"))

print(response.json())
```

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

const options = {
  method: 'POST',
  headers: {
    Accept: 'Accept',
    Authorization: `Basic ${credentials}`,
    'Content-Type': 'application/json'
  },
  body: '{"uncategorizedFile":"fi_9xKmPqRsTuVwXyZaBcDeFg","uncategorizedText":"Customer confirmed receipt of the item via email on 2023-08-10. Attaching the email screenshot."}'
};

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

```go Submit uncategorized evidence
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"uncategorizedFile\": \"fi_9xKmPqRsTuVwXyZaBcDeFg\",\n  \"uncategorizedText\": \"Customer confirmed receipt of the item via email on 2023-08-10. Attaching the email screenshot.\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

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

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

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

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

}
```

```ruby Submit uncategorized evidence
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::Post.new(url)
request["Accept"] = 'Accept'
request.basic_auth("<username>", "<password>")
request["Content-Type"] = 'application/json'
request.body = "{\n  \"uncategorizedFile\": \"fi_9xKmPqRsTuVwXyZaBcDeFg\",\n  \"uncategorizedText\": \"Customer confirmed receipt of the item via email on 2023-08-10. Attaching the email screenshot.\"\n}"

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

```java Submit uncategorized evidence
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://global-api-sandbox.afterpay.com/v2/disputes/dispute_id")
  .header("Accept", "Accept")
  .basicAuth("<username>", "<password>")
  .header("Content-Type", "application/json")
  .body("{\n  \"uncategorizedFile\": \"fi_9xKmPqRsTuVwXyZaBcDeFg\",\n  \"uncategorizedText\": \"Customer confirmed receipt of the item via email on 2023-08-10. Attaching the email screenshot.\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://global-api-sandbox.afterpay.com/v2/disputes/dispute_id', [
  'body' => '{
  "uncategorizedFile": "fi_9xKmPqRsTuVwXyZaBcDeFg",
  "uncategorizedText": "Customer confirmed receipt of the item via email on 2023-08-10. Attaching the email screenshot."
}',
  'headers' => [
    'Accept' => 'Accept',
    'Content-Type' => 'application/json',
  ],
    'auth' => ['<username>', '<password>'],
]);

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

```csharp Submit uncategorized evidence
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.POST);
request.AddHeader("Accept", "Accept");

request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"uncategorizedFile\": \"fi_9xKmPqRsTuVwXyZaBcDeFg\",\n  \"uncategorizedText\": \"Customer confirmed receipt of the item via email on 2023-08-10. Attaching the email screenshot.\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Submit uncategorized evidence
import Foundation

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

let headers = [
  "Accept": "Accept",
  "Authorization": "Basic \(credentials)",
  "Content-Type": "application/json"
]
let parameters = [
  "uncategorizedFile": "fi_9xKmPqRsTuVwXyZaBcDeFg",
  "uncategorizedText": "Customer confirmed receipt of the item via email on 2023-08-10. Attaching the email screenshot."
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

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 = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```