Update Dispute
curl --request PUT \
--url https://api.sandbox.sudo.cards/cards/disputes/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "not_received",
"explanation": "<string>",
"metadata": "{}"
}
'import requests
url = "https://api.sandbox.sudo.cards/cards/disputes/{id}"
payload = {
"reason": "not_received",
"explanation": "<string>",
"metadata": "{}"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: 'not_received', explanation: '<string>', metadata: '{}'})
};
fetch('https://api.sandbox.sudo.cards/cards/disputes/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.sudo.cards/cards/disputes/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'reason' => 'not_received',
'explanation' => '<string>',
'metadata' => '{}'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.sudo.cards/cards/disputes/{id}"
payload := strings.NewReader("{\n \"reason\": \"not_received\",\n \"explanation\": \"<string>\",\n \"metadata\": \"{}\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.sandbox.sudo.cards/cards/disputes/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"not_received\",\n \"explanation\": \"<string>\",\n \"metadata\": \"{}\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.sudo.cards/cards/disputes/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"not_received\",\n \"explanation\": \"<string>\",\n \"metadata\": \"{}\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"message": "Dispute updated successfully.",
"data": {
"_id": "6840c1aa2b3c4d5e6f700444",
"business": "670cec9d25852ba485d74273",
"transaction": "6840c1aa2b3c4d5e6f700333",
"reason": "fraudulent",
"explanation": "Customer did not authorize this transaction.",
"status": "pending",
"metadata": {},
"createdAt": "2025-06-04T21:05:26.115Z",
"updatedAt": "2025-06-05T09:15:00.000Z",
"__v": 0
}
}{
"statusCode": 400,
"message": "\"reason\" must be a valid dispute reason",
"data": null
}{
"statusCode": 401,
"message": "Unauthorized. Provide a valid API key in the Authorization header.",
"data": null
}{
"statusCode": 404,
"message": "Dispute not found.",
"data": null
}Disputes
Update Dispute
Updates a dispute for a specific transaction.
PUT
/
cards
/
disputes
/
{id}
Update Dispute
curl --request PUT \
--url https://api.sandbox.sudo.cards/cards/disputes/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "not_received",
"explanation": "<string>",
"metadata": "{}"
}
'import requests
url = "https://api.sandbox.sudo.cards/cards/disputes/{id}"
payload = {
"reason": "not_received",
"explanation": "<string>",
"metadata": "{}"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({reason: 'not_received', explanation: '<string>', metadata: '{}'})
};
fetch('https://api.sandbox.sudo.cards/cards/disputes/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sandbox.sudo.cards/cards/disputes/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'reason' => 'not_received',
'explanation' => '<string>',
'metadata' => '{}'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sandbox.sudo.cards/cards/disputes/{id}"
payload := strings.NewReader("{\n \"reason\": \"not_received\",\n \"explanation\": \"<string>\",\n \"metadata\": \"{}\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.sandbox.sudo.cards/cards/disputes/{id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"not_received\",\n \"explanation\": \"<string>\",\n \"metadata\": \"{}\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sandbox.sudo.cards/cards/disputes/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason\": \"not_received\",\n \"explanation\": \"<string>\",\n \"metadata\": \"{}\"\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 200,
"message": "Dispute updated successfully.",
"data": {
"_id": "6840c1aa2b3c4d5e6f700444",
"business": "670cec9d25852ba485d74273",
"transaction": "6840c1aa2b3c4d5e6f700333",
"reason": "fraudulent",
"explanation": "Customer did not authorize this transaction.",
"status": "pending",
"metadata": {},
"createdAt": "2025-06-04T21:05:26.115Z",
"updatedAt": "2025-06-05T09:15:00.000Z",
"__v": 0
}
}{
"statusCode": 400,
"message": "\"reason\" must be a valid dispute reason",
"data": null
}{
"statusCode": 401,
"message": "Unauthorized. Provide a valid API key in the Authorization header.",
"data": null
}{
"statusCode": 404,
"message": "Dispute not found.",
"data": null
}Authorizations
Path Parameters
The _id of the transaction to fetch.
Body
application/json
The reason for the dispute.
Available options:
not_received, fraudulent, duplicate, product_not_as_described, service_not_as_described, canceled, other More details on the dispute.
The key-value pair you wish to attach to the dispute object.
⌘I
