Get customer's cart
curl --request GET \
--url https://api-beta.pepay.io/api/commerce/merchant/carts \
--header 'x-commerce-api-key: <api-key>'import requests
url = "https://api-beta.pepay.io/api/commerce/merchant/carts"
headers = {"x-commerce-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-commerce-api-key': '<api-key>'}};
fetch('https://api-beta.pepay.io/api/commerce/merchant/carts', 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-beta.pepay.io/api/commerce/merchant/carts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-commerce-api-key: <api-key>"
],
]);
$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-beta.pepay.io/api/commerce/merchant/carts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-commerce-api-key", "<api-key>")
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-beta.pepay.io/api/commerce/merchant/carts")
.header("x-commerce-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-beta.pepay.io/api/commerce/merchant/carts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-commerce-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"merchantId": 123,
"customerId": "<string>",
"walletAddress": "<string>",
"walletNetwork": "<string>",
"items": [
{}
],
"subtotal": 123,
"itemCount": 123,
"createdAt": 123,
"updatedAt": 123
}
}Commerce
Get customer's cart
Retrieve cart contents for a customer identified by wallet or customer_id
GET
/
api
/
commerce
/
merchant
/
carts
Get customer's cart
curl --request GET \
--url https://api-beta.pepay.io/api/commerce/merchant/carts \
--header 'x-commerce-api-key: <api-key>'import requests
url = "https://api-beta.pepay.io/api/commerce/merchant/carts"
headers = {"x-commerce-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-commerce-api-key': '<api-key>'}};
fetch('https://api-beta.pepay.io/api/commerce/merchant/carts', 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-beta.pepay.io/api/commerce/merchant/carts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-commerce-api-key: <api-key>"
],
]);
$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-beta.pepay.io/api/commerce/merchant/carts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-commerce-api-key", "<api-key>")
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-beta.pepay.io/api/commerce/merchant/carts")
.header("x-commerce-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-beta.pepay.io/api/commerce/merchant/carts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-commerce-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"merchantId": 123,
"customerId": "<string>",
"walletAddress": "<string>",
"walletNetwork": "<string>",
"items": [
{}
],
"subtotal": 123,
"itemCount": 123,
"createdAt": 123,
"updatedAt": 123
}
}Authorizations
commerceApiKeymerchantApiKey
Legacy alias for commerce-scoped API keys. Prefer x-api-key with scope=commerce.
Query Parameters
Customer's wallet address (required with wallet_network)
Pattern:
^0x[a-fA-F0-9]{40}$Wallet network (required with wallet_address)
Available options:
ethereum, bsc, base, solana Merchant-specific customer ID (alternative to wallet)
Maximum string length:
255Was this page helpful?
⌘I

