List invoices (cursor pagination)
curl --request GET \
--url https://api-beta.pepay.io/api/v1/invoices \
--header 'x-api-key: <api-key>'import requests
url = "https://api-beta.pepay.io/api/v1/invoices"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api-beta.pepay.io/api/v1/invoices', 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/v1/invoices",
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-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/v1/invoices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-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/v1/invoices")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-beta.pepay.io/api/v1/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"object": "invoice",
"id": "inv_123",
"merchant_id": 42,
"status": "paid",
"invoice_type": "standard",
"currency": "usd",
"amount": 129900,
"amount_decimal": "129.900",
"amount_unit": "usd_millis",
"environment": "mainnet",
"created_at": 1735732800
}
],
"has_more": false
}List Invoices
List invoices using cursor pagination and optional expansions.
GET
/
api
/
v1
/
invoices
List invoices (cursor pagination)
curl --request GET \
--url https://api-beta.pepay.io/api/v1/invoices \
--header 'x-api-key: <api-key>'import requests
url = "https://api-beta.pepay.io/api/v1/invoices"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api-beta.pepay.io/api/v1/invoices', 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/v1/invoices",
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-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/v1/invoices"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-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/v1/invoices")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-beta.pepay.io/api/v1/invoices")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"object": "list",
"data": [
{
"object": "invoice",
"id": "inv_123",
"merchant_id": 42,
"status": "paid",
"invoice_type": "standard",
"currency": "usd",
"amount": 129900,
"amount_decimal": "129.900",
"amount_unit": "usd_millis",
"environment": "mainnet",
"created_at": 1735732800
}
],
"has_more": false
}Overview
Use this endpoint to list invoices with Stripe-style cursor pagination and optionalexpand fields.
Authentication
- Merchant server auth:
x-api-keyorAuthorization: Bearer <jwt>
Request
SDK
const invoices = await pepay.invoices.list({
limit: 10,
expand: ['latest_payment']
});
cURL
curl "https://api-beta.pepay.io/api/v1/invoices?limit=10&expand=latest_payment" \
-H "x-api-key: sk_live_..."
Response
{
"object": "list",
"data": [
{
"object": "invoice",
"id": "550e8400-e29b-41d4-a716-446655440000",
"merchant_id": 123,
"status": "unpaid",
"invoice_type": "standard",
"currency": "usd",
"amount": 49990,
"amount_decimal": "49.990",
"amount_unit": "usd_millis",
"environment": "devnet",
"created_at": 1766318400
}
],
"has_more": false
}
Errors
400invalid cursor or query parameters401missing/invalid merchant auth
Examples
Cursor pagination:const page1 = await pepay.invoices.list({ limit: 10 });
const last = page1.data?.[page1.data.length - 1];
const page2 = await pepay.invoices.list({ limit: 10, starting_after: last?.id });
const receipts = await pepay.invoices.list({
payer_wallet_address: '0x742d35Cc6634C0532925a3b844Bc9e7595f6ce3c',
payer_wallet_network: 'base',
status: 'paid'
});
Authorizations
merchantApiKeybearerAuth
API key for server-to-server operations (scope=merchant or commerce)
Query Parameters
Max number of invoices to return.
Required range:
1 <= x <= 100Cursor (return invoices created before this ID).
Cursor (return invoices created after this ID).
Comma-separated invoice statuses.
Comma-separated invoice types (product keys are locked to products).
Filter by merchant customer ID.
Filter by payer wallet address (matches any invoice payment).
Optional; requires payer_wallet_address.
Available options:
ethereum, base, solana, avalanche, ton, bsc, arbitrum, optimism, cardano, sui Filter by network environment.
Available options:
mainnet, devnet Return invoices created on/after this time.
Return invoices created on/before this time.
Comma-separated expansions (latest_payment, payments).
Max payments per invoice when expand includes payments.
Required range:
1 <= x <= 100Was this page helpful?

