curl --request GET \
--url https://api.cope.com/v1/commerce/payments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cope.com/v1/commerce/payments"
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/payments', 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/payments",
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/payments"
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/payments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cope.com/v1/commerce/payments")
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 payments
Lists the business’s sale payments, newest first by created_at. Without status only succeeded sales whose funds availability date is known are listed, exactly as before the parameter existed. Name status (trial, pending, succeeded, failed) to list sales in those statuses, including a succeeded sale whose funds date is not known yet, in the same order. To collect the sales that settled since your last sync, pass cash_flow_from set to that time (and cash_flow_to for a window) and read every page of the response; do not stop at the first payment you already hold, because a sale created earlier can settle later and is listed by its creation time. Refunds are listed at GET /v1/commerce/refunds and chargebacks at GET /v1/commerce/chargebacks.
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/payments \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cope.com/v1/commerce/payments"
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/payments', 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/payments",
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/payments"
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/payments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cope.com/v1/commerce/payments")
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
Query Parameters
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. Without it every payment method is returned. An unknown name or an empty element is refused with 422.
Which sale statuses to return: trial, pending, succeeded, failed, or several separated by commas (pending,failed). trial: a free trial started, nothing charged yet. pending: the charge is processing. succeeded: paid. failed: the charge did not go through. Without it only succeeded sales whose funds availability date is known are returned, exactly as before this parameter existed; named, it filters on status alone, so succeeded also returns a sale whose funds date is not known yet. An unknown name or an empty element is refused with 422.