Retrieve a dispute
curl --request GET \
--url https://api.cope.com/v1/commerce/disputes/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cope.com/v1/commerce/disputes/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cope.com/v1/commerce/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.cope.com/v1/commerce/disputes/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cope.com/v1/commerce/disputes/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cope.com/v1/commerce/disputes/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cope.com/v1/commerce/disputes/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"amount_minor_units": 123,
"chargeback": {
"id": "py_A1b2C3d4E5f6",
"object": "chargeback"
},
"chargeback_reversal": {
"id": "py_A1b2C3d4E5f6",
"object": "chargeback"
},
"created_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"evidence_due_by": "2023-11-07T05:31:56Z",
"network_reason_code": "<string>",
"object": "dispute",
"order": {
"id": "ord_A1b2C3d4E5f6",
"object": "order"
},
"payment": {
"id": "py_A1b2C3d4E5f6",
"object": "payment"
},
"processor": "stripe",
"processor_id": "<string>",
"reason": "<string>",
"state": "open"
}
}
Retrieve a dispute
Retrieves one of your disputes by its processor’s id (Stripe du_..., PayPal PP-D-...), the dispute.processor_id a chargeback carries. COPE publishes no id of its own for a dispute. Any other id answers 404.
Requires the payments permission at read. An API key holds a permission at the lower of its own level (read for a read-only key) and its holder’s role; a key without it is refused with 403.
GET
/
v1
/
commerce
/
disputes
/
{id}
Retrieve a dispute
curl --request GET \
--url https://api.cope.com/v1/commerce/disputes/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cope.com/v1/commerce/disputes/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cope.com/v1/commerce/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.cope.com/v1/commerce/disputes/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cope.com/v1/commerce/disputes/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cope.com/v1/commerce/disputes/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cope.com/v1/commerce/disputes/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"amount_minor_units": 123,
"chargeback": {
"id": "py_A1b2C3d4E5f6",
"object": "chargeback"
},
"chargeback_reversal": {
"id": "py_A1b2C3d4E5f6",
"object": "chargeback"
},
"created_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"evidence_due_by": "2023-11-07T05:31:56Z",
"network_reason_code": "<string>",
"object": "dispute",
"order": {
"id": "ord_A1b2C3d4E5f6",
"object": "order"
},
"payment": {
"id": "py_A1b2C3d4E5f6",
"object": "payment"
},
"processor": "stripe",
"processor_id": "<string>",
"reason": "<string>",
"state": "open"
}
}
Authorizations
Bearer credential for the public API: a live COPE API key (ck_live_*; keys issued earlier as cope_sk_live_* keep working). Dashboard sign-in tokens are not accepted.
Path Parameters
id public identifier.
The processor's dispute id: Stripe du_... or dp_..., PayPal PP-D-....
Pattern:
^[A-Za-z0-9_-]{1,100}$Example:
"du_1QeXampLeDisPute"
Response
Successful response
Show child attributes
Show child attributes