curl --request GET \
--url https://api.cope.com/v1/commerce/chargebacks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cope.com/v1/commerce/chargebacks"
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/chargebacks', 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/chargebacks",
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/chargebacks"
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/chargebacks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cope.com/v1/commerce/chargebacks")
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_bodyList chargebacks
Lists the business’s chargebacks and chargeback reversals, newest first by created_at. A chargeback is a negative movement taken from you when a buyer disputed a sale; a reversal is the positive movement that returned it when the dispute was won. Each names its dispute by the processor’s id, readable at GET /v1/commerce/disputes/. This resource follows the API convention: {object, id} references, amount_minor_units, millisecond UTC timestamps.
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.
curl --request GET \
--url https://api.cope.com/v1/commerce/chargebacks \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cope.com/v1/commerce/chargebacks"
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/chargebacks', 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/chargebacks",
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/chargebacks"
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/chargebacks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cope.com/v1/commerce/chargebacks")
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_bodyAuthorizations
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.
Query Parameters
Inclusive lower bound on created_at, ISO 8601. A bare date (YYYY-MM-DD) expands to the beginning of that day in UTC; a full date-time is used as given, and timezone-naive values are interpreted as UTC.
Inclusive upper bound on created_at, ISO 8601. A bare date (YYYY-MM-DD) expands to the end of that day in UTC; a full date-time is used as given, and timezone-naive values are interpreted as UTC.
Which payment methods to return: one name or several separated by commas (card,sepa). The names are the values payment_method carries: card, klarna, affirm, sepa, ach, afterpay_clearpay, paypal, terminal, other, interac_present, kr_card, alma, billie, scalapay, sequra, sunbit, zip, acss_debit, au_becs_debit, bacs_debit, nz_bank_account, payto, ideal, bancontact, eps, fpx, giropay, p24, sofort, pay_by_bank, link, amazon_pay, cashapp, alipay, wechat_pay, grabpay, revolut_pay, mobilepay, twint, satispay, bizum, mb_way, kakao_pay, naver_pay, payco, samsung_pay, paypay, swish, blik, paynow, pix, promptpay, upi, boleto, konbini, multibanco, oxxo, crypto, customer_balance, stripe_balance. Without it every payment method is returned. An unknown name or an empty element is refused with 422.
Which statuses to return: pending, succeeded, failed, or several separated by commas. Without it every status is returned. An unknown name or an empty element is refused with 422.
Which rows to return: chargeback, chargeback_reversal, or both separated by a comma. Without it both are returned. A chargeback_reversal returns a chargeback's money to you when the dispute is won; its amount_cents is positive. An unknown name or an empty element is refused with 422.
Page number for paginated results. Values below 1 and non-numeric values are ignored and the first page is returned; a page past the last one returns the last page. current_page is accepted as an older name for it and wins when both are sent.
x >= 1Number of records per page. Defaults to 12; values above 25 are clamped to 25; values below 1 and non-numeric values are ignored and the default is used. items and limit are accepted as older names for it, read only when per_page is absent.
1 <= x <= 25