Get invoice totals
curl --request GET \
--url https://api-beta.pepay.io/api/v1/invoices/totals \
--header 'x-api-key: <api-key>'import requests
url = "https://api-beta.pepay.io/api/v1/invoices/totals"
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/totals', 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/totals",
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/totals"
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/totals")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-beta.pepay.io/api/v1/invoices/totals")
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": "invoice_totals",
"currency": "usd",
"amount_unit": "usd_millis",
"totals": {
"all": {
"amount": 129900,
"amount_decimal": "129.900",
"count": 3
},
"paid": {
"amount": 99900,
"amount_decimal": "99.900",
"count": 2
},
"unpaid": {
"amount": 30000,
"amount_decimal": "30.000",
"count": 1
},
"underpaid": {
"amount": 0,
"amount_decimal": "0.000",
"count": 0
},
"expired": {
"amount": 0,
"amount_decimal": "0.000",
"count": 0
},
"canceled": {
"amount": 0,
"amount_decimal": "0.000",
"count": 0
}
}
}Merchant
Get invoice totals
Retrieve totals for invoices by status (amounts in USD mills).
GET
/
api
/
v1
/
invoices
/
totals
Get invoice totals
curl --request GET \
--url https://api-beta.pepay.io/api/v1/invoices/totals \
--header 'x-api-key: <api-key>'import requests
url = "https://api-beta.pepay.io/api/v1/invoices/totals"
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/totals', 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/totals",
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/totals"
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/totals")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-beta.pepay.io/api/v1/invoices/totals")
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": "invoice_totals",
"currency": "usd",
"amount_unit": "usd_millis",
"totals": {
"all": {
"amount": 129900,
"amount_decimal": "129.900",
"count": 3
},
"paid": {
"amount": 99900,
"amount_decimal": "99.900",
"count": 2
},
"unpaid": {
"amount": 30000,
"amount_decimal": "30.000",
"count": 1
},
"underpaid": {
"amount": 0,
"amount_decimal": "0.000",
"count": 0
},
"expired": {
"amount": 0,
"amount_decimal": "0.000",
"count": 0
},
"canceled": {
"amount": 0,
"amount_decimal": "0.000",
"count": 0
}
}
}Authorizations
merchantApiKeybearerAuth
API key for server-to-server operations (scope=merchant or commerce)
Query Parameters
Comma-separated invoice statuses.
Comma-separated invoice types.
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 Include invoices created on/after this time.
Include invoices created on/before this time.
Was this page helpful?

