List payment sessions
curl --request GET \
--url https://api.cdp.coinbase.com/platform/v2/payment-sessions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cdp.coinbase.com/platform/v2/payment-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.cdp.coinbase.com/platform/v2/payment-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.cdp.coinbase.com/platform/v2/payment-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.cdp.coinbase.com/platform/v2/payment-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.cdp.coinbase.com/platform/v2/payment-sessions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cdp.coinbase.com/platform/v2/payment-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{
"paymentSessions": [
{
"paymentSessionId": "paymentSession_82c879c1-84e1-44ed-a8c2-1ac239cf09ad",
"entityId": "entity_af2937b0-9846-4fe7-bfe9-ccc22d935114",
"status": "capture_succeeded",
"amount": "1.00",
"asset": "usdc",
"target": {
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"network": "base"
},
"source": {
"address": "0xAbC1234567890aBcDeF1234567890AbCdEf123456",
"network": "base",
"asset": "usdc"
},
"autoCapture": false,
"expiries": {
"authorizationExpiresAt": "2025-12-31T23:59:59.000Z",
"captureExpiresAt": "2026-01-15T23:59:59.000Z",
"refundExpiresAt": "2026-02-15T23:59:59.000Z"
},
"balances": {
"capturable": "0",
"captured": "1.00",
"refundable": "1.00",
"refunded": "0"
},
"authorizations": [
{
"authorizationId": "authorization_82c879c1-84e1-44ed-a8c2-1ac239cf09ad",
"paymentSessionId": "paymentSession_82c879c1-84e1-44ed-a8c2-1ac239cf09ad",
"status": "succeeded",
"amount": "1.00",
"source": {
"address": "0xAbC1234567890aBcDeF1234567890AbCdEf123456",
"network": "base",
"asset": "usdc"
},
"onchainTransactions": [
{
"transactionHash": "0xabc123def456789012345678901234567890abcdef1234567890abcdef123456",
"network": "base"
}
],
"createdAt": "2025-06-15T12:01:00.000Z",
"updatedAt": "2025-06-15T12:02:00.000Z"
}
],
"captures": [
{
"captureId": "capture_93d980d2-95f2-55fe-b9d3-2bd340cf10be",
"paymentSessionId": "paymentSession_82c879c1-84e1-44ed-a8c2-1ac239cf09ad",
"status": "succeeded",
"amount": "1.00",
"finalCapture": true,
"onchainTransactions": [
{
"transactionHash": "0xdef456789012345678901234567890abcdef1234567890abcdef1234567890ab",
"network": "base"
}
],
"createdAt": "2025-06-15T12:03:00.000Z",
"updatedAt": "2025-06-15T12:04:00.000Z"
}
],
"url": "https://pay.coinbase.com/payment-sessions/paymentSession_82c879c1-84e1-44ed-a8c2-1ac239cf09ad",
"x402Url": "https://api.cdp.coinbase.com/platform/v2/payment-sessions/paymentSession_82c879c1-84e1-44ed-a8c2-1ac239cf09ad/authorizations/x402",
"redirect": {
"failureUrl": "https://merchant.example.com/payment/failed",
"successUrl": "https://merchant.example.com/payment/success"
},
"externalReferenceId": "merchant-order-abc123",
"metadata": {
"customer_id": "cust_12345",
"order_reference": "order-67890"
},
"createdAt": "2025-06-15T12:00:00.000Z",
"updatedAt": "2025-06-15T12:04:00.000Z"
},
{
"paymentSessionId": "paymentSession_a4eaa1f3-c6a4-77f9-d1f5-4df562df32df",
"entityId": "entity_af2937b0-9846-4fe7-bfe9-ccc22d935114",
"status": "capture_succeeded",
"amount": "1.00",
"asset": "usdc",
"target": {
"accountId": "account_af2937b0-9846-4fe7-bfe9-ccc22d935114",
"asset": "usd"
},
"source": {
"coinbaseUserId": "coinbase_user_abc123"
},
"autoCapture": true,
"expiries": {
"authorizationExpiresAt": "2025-12-31T23:59:59.000Z",
"captureExpiresAt": "2026-01-15T23:59:59.000Z",
"refundExpiresAt": "2026-02-15T23:59:59.000Z"
},
"balances": {
"capturable": "0",
"captured": "1.00",
"refundable": "1.00",
"refunded": "0"
},
"authorizations": [
{
"authorizationId": "authorization_a4eaa1f3-c6a4-77f9-d1f5-4df562df32df",
"paymentSessionId": "paymentSession_a4eaa1f3-c6a4-77f9-d1f5-4df562df32df",
"status": "succeeded",
"amount": "1.00",
"source": {
"coinbaseUserId": "coinbase_user_abc123"
},
"createdAt": "2025-06-15T13:01:00.000Z",
"updatedAt": "2025-06-15T13:02:00.000Z"
}
],
"captures": [
{
"captureId": "capture_b5fbb2f4-d7a5-88af-e2f6-5ef673ef43ef",
"paymentSessionId": "paymentSession_a4eaa1f3-c6a4-77f9-d1f5-4df562df32df",
"status": "succeeded",
"amount": "1.00",
"finalCapture": true,
"createdAt": "2025-06-15T13:03:00.000Z",
"updatedAt": "2025-06-15T13:04:00.000Z"
}
],
"url": "https://pay.coinbase.com/payment-sessions/paymentSession_a4eaa1f3-c6a4-77f9-d1f5-4df562df32df",
"redirect": {
"failureUrl": "https://merchant.example.com/payment/failed",
"successUrl": "https://merchant.example.com/payment/success"
},
"externalReferenceId": "merchant-order-def456",
"metadata": {
"customer_id": "cust_67890",
"order_reference": "order-13579"
},
"createdAt": "2025-06-15T13:00:00.000Z",
"updatedAt": "2025-06-15T13:04:00.000Z"
}
],
"nextPageToken": "eyJsYXN0X2lkIjogImFiYzEyMyIsICJ0aW1lc3RhbXAiOiAxNzA3ODIzNzAxfQ=="
}{
"errorType": "invalid_request",
"errorMessage": "Invalid query parameters."
}{
"errorType": "internal_server_error",
"errorMessage": "An internal server error occurred. Please try again later."
}{
"errorType": "bad_gateway",
"errorMessage": "Bad gateway. Please try again later."
}{
"errorType": "service_unavailable",
"errorMessage": "Service unavailable. Please try again later."
}Payment Acceptance
List payment sessions
Returns a paginated list of payment sessions that the API key has permission to access.
GET
/
v2
/
payment-sessions
List payment sessions
curl --request GET \
--url https://api.cdp.coinbase.com/platform/v2/payment-sessions \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cdp.coinbase.com/platform/v2/payment-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.cdp.coinbase.com/platform/v2/payment-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.cdp.coinbase.com/platform/v2/payment-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.cdp.coinbase.com/platform/v2/payment-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.cdp.coinbase.com/platform/v2/payment-sessions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cdp.coinbase.com/platform/v2/payment-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{
"paymentSessions": [
{
"paymentSessionId": "paymentSession_82c879c1-84e1-44ed-a8c2-1ac239cf09ad",
"entityId": "entity_af2937b0-9846-4fe7-bfe9-ccc22d935114",
"status": "capture_succeeded",
"amount": "1.00",
"asset": "usdc",
"target": {
"address": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"network": "base"
},
"source": {
"address": "0xAbC1234567890aBcDeF1234567890AbCdEf123456",
"network": "base",
"asset": "usdc"
},
"autoCapture": false,
"expiries": {
"authorizationExpiresAt": "2025-12-31T23:59:59.000Z",
"captureExpiresAt": "2026-01-15T23:59:59.000Z",
"refundExpiresAt": "2026-02-15T23:59:59.000Z"
},
"balances": {
"capturable": "0",
"captured": "1.00",
"refundable": "1.00",
"refunded": "0"
},
"authorizations": [
{
"authorizationId": "authorization_82c879c1-84e1-44ed-a8c2-1ac239cf09ad",
"paymentSessionId": "paymentSession_82c879c1-84e1-44ed-a8c2-1ac239cf09ad",
"status": "succeeded",
"amount": "1.00",
"source": {
"address": "0xAbC1234567890aBcDeF1234567890AbCdEf123456",
"network": "base",
"asset": "usdc"
},
"onchainTransactions": [
{
"transactionHash": "0xabc123def456789012345678901234567890abcdef1234567890abcdef123456",
"network": "base"
}
],
"createdAt": "2025-06-15T12:01:00.000Z",
"updatedAt": "2025-06-15T12:02:00.000Z"
}
],
"captures": [
{
"captureId": "capture_93d980d2-95f2-55fe-b9d3-2bd340cf10be",
"paymentSessionId": "paymentSession_82c879c1-84e1-44ed-a8c2-1ac239cf09ad",
"status": "succeeded",
"amount": "1.00",
"finalCapture": true,
"onchainTransactions": [
{
"transactionHash": "0xdef456789012345678901234567890abcdef1234567890abcdef1234567890ab",
"network": "base"
}
],
"createdAt": "2025-06-15T12:03:00.000Z",
"updatedAt": "2025-06-15T12:04:00.000Z"
}
],
"url": "https://pay.coinbase.com/payment-sessions/paymentSession_82c879c1-84e1-44ed-a8c2-1ac239cf09ad",
"x402Url": "https://api.cdp.coinbase.com/platform/v2/payment-sessions/paymentSession_82c879c1-84e1-44ed-a8c2-1ac239cf09ad/authorizations/x402",
"redirect": {
"failureUrl": "https://merchant.example.com/payment/failed",
"successUrl": "https://merchant.example.com/payment/success"
},
"externalReferenceId": "merchant-order-abc123",
"metadata": {
"customer_id": "cust_12345",
"order_reference": "order-67890"
},
"createdAt": "2025-06-15T12:00:00.000Z",
"updatedAt": "2025-06-15T12:04:00.000Z"
},
{
"paymentSessionId": "paymentSession_a4eaa1f3-c6a4-77f9-d1f5-4df562df32df",
"entityId": "entity_af2937b0-9846-4fe7-bfe9-ccc22d935114",
"status": "capture_succeeded",
"amount": "1.00",
"asset": "usdc",
"target": {
"accountId": "account_af2937b0-9846-4fe7-bfe9-ccc22d935114",
"asset": "usd"
},
"source": {
"coinbaseUserId": "coinbase_user_abc123"
},
"autoCapture": true,
"expiries": {
"authorizationExpiresAt": "2025-12-31T23:59:59.000Z",
"captureExpiresAt": "2026-01-15T23:59:59.000Z",
"refundExpiresAt": "2026-02-15T23:59:59.000Z"
},
"balances": {
"capturable": "0",
"captured": "1.00",
"refundable": "1.00",
"refunded": "0"
},
"authorizations": [
{
"authorizationId": "authorization_a4eaa1f3-c6a4-77f9-d1f5-4df562df32df",
"paymentSessionId": "paymentSession_a4eaa1f3-c6a4-77f9-d1f5-4df562df32df",
"status": "succeeded",
"amount": "1.00",
"source": {
"coinbaseUserId": "coinbase_user_abc123"
},
"createdAt": "2025-06-15T13:01:00.000Z",
"updatedAt": "2025-06-15T13:02:00.000Z"
}
],
"captures": [
{
"captureId": "capture_b5fbb2f4-d7a5-88af-e2f6-5ef673ef43ef",
"paymentSessionId": "paymentSession_a4eaa1f3-c6a4-77f9-d1f5-4df562df32df",
"status": "succeeded",
"amount": "1.00",
"finalCapture": true,
"createdAt": "2025-06-15T13:03:00.000Z",
"updatedAt": "2025-06-15T13:04:00.000Z"
}
],
"url": "https://pay.coinbase.com/payment-sessions/paymentSession_a4eaa1f3-c6a4-77f9-d1f5-4df562df32df",
"redirect": {
"failureUrl": "https://merchant.example.com/payment/failed",
"successUrl": "https://merchant.example.com/payment/success"
},
"externalReferenceId": "merchant-order-def456",
"metadata": {
"customer_id": "cust_67890",
"order_reference": "order-13579"
},
"createdAt": "2025-06-15T13:00:00.000Z",
"updatedAt": "2025-06-15T13:04:00.000Z"
}
],
"nextPageToken": "eyJsYXN0X2lkIjogImFiYzEyMyIsICJ0aW1lc3RhbXAiOiAxNzA3ODIzNzAxfQ=="
}{
"errorType": "invalid_request",
"errorMessage": "Invalid query parameters."
}{
"errorType": "internal_server_error",
"errorMessage": "An internal server error occurred. Please try again later."
}{
"errorType": "bad_gateway",
"errorMessage": "Bad gateway. Please try again later."
}{
"errorType": "service_unavailable",
"errorMessage": "Service unavailable. Please try again later."
}Authorizations
A JWT signed using your CDP API Key Secret, encoded in base64. Refer to the Generate Bearer Token section of our Authentication docs for information on how to generate your Bearer Token.
Query Parameters
The number of resources to return per page.
The token for the next page of resources, if any.
Was this page helpful?
⌘I