List checkout sessions
curl --request GET \
--url https://api-dashboard.payra.com/v1/checkout-sessions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-dashboard.payra.com/v1/checkout-sessions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-dashboard.payra.com/v1/checkout-sessions', 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-dashboard.payra.com/v1/checkout-sessions",
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-dashboard.payra.com/v1/checkout-sessions"
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-dashboard.payra.com/v1/checkout-sessions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dashboard.payra.com/v1/checkout-sessions")
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{
"object": "list",
"data": [
{
"object": "checkout_session",
"id": "cs_test_7Hs2kQ9mL1pXv4cR8tWzAbCd",
"status": "open",
"amount": 12550,
"currency": "USD",
"reference": "1042",
"description": "Northwind order #1042",
"success_url": "https://shop.example/thanks?order=1042",
"cancel_url": "https://shop.example/cart",
"customer_email": "[email protected]",
"customer": null,
"payment_method_types": [
"card"
],
"metadata": {
"order_id": "1042",
"cart": "a1b2c3"
},
"payment": "pay_test_7Hs2kQ9mL1pXv4cR8tWzAbCdEf",
"livemode": false,
"expires_at": "2026-09-26T12:00:00.000Z",
"completed_at": null,
"created_at": "2026-09-25T12:00:00.000Z"
}
],
"has_more": true
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}Checkout sessions
List checkout sessions
Your checkout sessions, newest first, a page at a time; walk the pages with starting_after.
GET
/
checkout-sessions
List checkout sessions
curl --request GET \
--url https://api-dashboard.payra.com/v1/checkout-sessions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-dashboard.payra.com/v1/checkout-sessions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-dashboard.payra.com/v1/checkout-sessions', 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-dashboard.payra.com/v1/checkout-sessions",
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-dashboard.payra.com/v1/checkout-sessions"
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-dashboard.payra.com/v1/checkout-sessions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dashboard.payra.com/v1/checkout-sessions")
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{
"object": "list",
"data": [
{
"object": "checkout_session",
"id": "cs_test_7Hs2kQ9mL1pXv4cR8tWzAbCd",
"status": "open",
"amount": 12550,
"currency": "USD",
"reference": "1042",
"description": "Northwind order #1042",
"success_url": "https://shop.example/thanks?order=1042",
"cancel_url": "https://shop.example/cart",
"customer_email": "[email protected]",
"customer": null,
"payment_method_types": [
"card"
],
"metadata": {
"order_id": "1042",
"cart": "a1b2c3"
},
"payment": "pay_test_7Hs2kQ9mL1pXv4cR8tWzAbCdEf",
"livemode": false,
"expires_at": "2026-09-26T12:00:00.000Z",
"completed_at": null,
"created_at": "2026-09-25T12:00:00.000Z"
}
],
"has_more": true
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}Authorizations
A secret key, sk_test_... or sk_live_...; a publishable key (pk_...) on the browser routes only
Query Parameters
How many to return, 1 to 100.
Required range:
1 <= x <= 100Example:
20
The id of the last session of the previous page; the page after it is returned.
Required string length:
1 - 64Example:
"cs_test_7Hs2kQ9mL1pXv4cR8tWzAbCd"