> This page is for MVS Pay.

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

# Attach dispute evidence

POST https://pay.mvscloud.com/api/disputes/{id}/evidence
Content-Type: application/json

Attaches dispute evidence to a dispute via the engine (`POST /v1/disputes/:id/evidence`). Hyperswitch's evidence submission is JSON-based (the pre-pivot Finix multipart file-upload flow no longer has a backend), so the parsed JSON evidence body is forwarded verbatim. Pass an `Idempotency-Key` header to make the attach safe to retry. This attaches evidence but does NOT finalize it — call `POST /api/disputes/{id}/submit` to commit the response to the connector.

Note: requires the `disputes:write` scope, which is defined in the scope catalog but is NOT included in the default API-key grant — keys must be explicitly granted `disputes:write`.

Reference: https://docs.mvscloud.com/mvs-pay/api/disputes/submit-dispute-evidence

## Authentication

- `x-api-key` header (required) — A scoped MvsPayApiKey, e.g. `mvspay_live_…`. Mint and scope keys from the dashboard (Settings → API Keys).

## Request

### Path parameters

- `id` (string, required) — The dispute id.

### Headers

- `Idempotency-Key` (string, optional) — Client-supplied idempotency key to make the attach safe to retry.

### Body (application/json)

This endpoint expects a DisputeEvidenceSubmitRequest.

- `evidence_type` (string, optional) — The kind of evidence being attached (e.g. shipping_documentation, receipt, customer_communication).
- `uncategorized_text` (string, optional) — Free-text supporting statement.

## Response

### 200

Evidence attached.

- `success` (boolean, required)

## Errors

### 400 Bad Request Error

Invalid request (e.g. malformed JSON, missing required field, amount below minimum).

- `error` (ErrorResponseError, required)

### 401 Unauthorized Error

Missing or invalid API key.

- `error` (ErrorResponseError, required)

### 403 Forbidden Error

The key lacks the required scope, or the body references a different organization.

- `error` (ErrorResponseError, required)

### 500 Internal Server Error

Unexpected server error.

- `error` (ErrorResponseError, required)

### 502 Bad Gateway Error

The payments engine (Hyperswitch/connector) returned an error.

- `error` (ErrorResponseError, required)

## Types

### ErrorResponseError

- `code` (string, required) — e.g. UNAUTHORIZED, FORBIDDEN, ERROR.
- `message` (string, required)
- `details` (map from string to any, optional)

## Examples

**Request**

```json
{
  "evidence_type": "shipping_documentation",
  "uncategorized_text": "Order delivered and signed for by the cardholder.",
  "shipping_carrier": "UPS",
  "shipping_tracking_number": "1Z999AA10123456784"
}
```

**Response**

```json
{
  "success": true
}
```

**SDK Code**

```python Disputes_submitDisputeEvidence_example
import requests

url = "https://pay.mvscloud.com/api/disputes/id/evidence"

payload = {
    "evidence_type": "shipping_documentation",
    "uncategorized_text": "Order delivered and signed for by the cardholder.",
    "shipping_carrier": "UPS",
    "shipping_tracking_number": "1Z999AA10123456784"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Disputes_submitDisputeEvidence_example
const url = 'https://pay.mvscloud.com/api/disputes/id/evidence';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"evidence_type":"shipping_documentation","uncategorized_text":"Order delivered and signed for by the cardholder.","shipping_carrier":"UPS","shipping_tracking_number":"1Z999AA10123456784"}'
};

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

```go Disputes_submitDisputeEvidence_example
package main

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

func main() {

	url := "https://pay.mvscloud.com/api/disputes/id/evidence"

	payload := strings.NewReader("{\n  \"evidence_type\": \"shipping_documentation\",\n  \"uncategorized_text\": \"Order delivered and signed for by the cardholder.\",\n  \"shipping_carrier\": \"UPS\",\n  \"shipping_tracking_number\": \"1Z999AA10123456784\"\n}")

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

	req.Header.Add("x-api-key", "<apiKey>")
	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 Disputes_submitDisputeEvidence_example
require 'uri'
require 'net/http'

url = URI("https://pay.mvscloud.com/api/disputes/id/evidence")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"evidence_type\": \"shipping_documentation\",\n  \"uncategorized_text\": \"Order delivered and signed for by the cardholder.\",\n  \"shipping_carrier\": \"UPS\",\n  \"shipping_tracking_number\": \"1Z999AA10123456784\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://pay.mvscloud.com/api/disputes/id/evidence")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"evidence_type\": \"shipping_documentation\",\n  \"uncategorized_text\": \"Order delivered and signed for by the cardholder.\",\n  \"shipping_carrier\": \"UPS\",\n  \"shipping_tracking_number\": \"1Z999AA10123456784\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://pay.mvscloud.com/api/disputes/id/evidence', [
  'body' => '{
  "evidence_type": "shipping_documentation",
  "uncategorized_text": "Order delivered and signed for by the cardholder.",
  "shipping_carrier": "UPS",
  "shipping_tracking_number": "1Z999AA10123456784"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Disputes_submitDisputeEvidence_example
using RestSharp;

var client = new RestClient("https://pay.mvscloud.com/api/disputes/id/evidence");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"evidence_type\": \"shipping_documentation\",\n  \"uncategorized_text\": \"Order delivered and signed for by the cardholder.\",\n  \"shipping_carrier\": \"UPS\",\n  \"shipping_tracking_number\": \"1Z999AA10123456784\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Disputes_submitDisputeEvidence_example
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "evidence_type": "shipping_documentation",
  "uncategorized_text": "Order delivered and signed for by the cardholder.",
  "shipping_carrier": "UPS",
  "shipping_tracking_number": "1Z999AA10123456784"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://pay.mvscloud.com/api/disputes/id/evidence")! 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()
```