curl --request GET \
--url https://api.paygentic.io/v0/revenue/accounts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paygentic.io/v0/revenue/accounts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.paygentic.io/v0/revenue/accounts', 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.paygentic.io/v0/revenue/accounts",
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.paygentic.io/v0/revenue/accounts"
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.paygentic.io/v0/revenue/accounts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v0/revenue/accounts")
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",
"totals": [
{
"currency": "<string>",
"outstanding": {
"count": 1,
"amount": "<string>",
"awaitingPayment": {
"count": 1,
"amount": "<string>"
},
"paymentFailed": {
"count": 1,
"amount": "<string>"
}
}
}
],
"data": [
{
"customerId": "<string>",
"customerName": "<string>",
"currency": "<string>",
"outstanding": {
"count": 1,
"amount": "<string>",
"awaitingPayment": {
"count": 1,
"amount": "<string>"
},
"paymentFailed": {
"count": 1,
"amount": "<string>"
}
}
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123
}
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}List customer accounts
Returns each customer’s account as at today, one row per customer and currency, with a total per currency. Every figure covers all dates: there is no date window.
outstanding is what customers owe: every invoice with status ISSUED or PAYMENT_FAILED, at the amount due printed on the invoice (subtotal and tax, each rounded to the currency’s minor unit), so it is gross of tax. Revenue (GET /v0/revenue) is net of tax. outstanding splits into awaitingPayment (status ISSUED) and paymentFailed (status PAYMENT_FAILED, collection has ended); the two always add up to it, in count and amount. A credit invoice (a negative amount due) nets against what is owed and is counted in no count; nor is an invoice whose amount due rounds to zero. A customer with nothing counted and nothing owed has no row.
Amounts are grouped by currency and never combined or converted. totals covers every row in the filter, not only the returned page, so the rows on one page add up to totals only when the page holds every row. Pages fetched in separate requests are separate reads.
curl --request GET \
--url https://api.paygentic.io/v0/revenue/accounts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paygentic.io/v0/revenue/accounts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.paygentic.io/v0/revenue/accounts', 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.paygentic.io/v0/revenue/accounts",
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.paygentic.io/v0/revenue/accounts"
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.paygentic.io/v0/revenue/accounts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v0/revenue/accounts")
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",
"totals": [
{
"currency": "<string>",
"outstanding": {
"count": 1,
"amount": "<string>",
"awaitingPayment": {
"count": 1,
"amount": "<string>"
},
"paymentFailed": {
"count": 1,
"amount": "<string>"
}
}
}
],
"data": [
{
"customerId": "<string>",
"customerName": "<string>",
"currency": "<string>",
"outstanding": {
"count": 1,
"amount": "<string>",
"awaitingPayment": {
"count": 1,
"amount": "<string>"
},
"paymentFailed": {
"count": 1,
"amount": "<string>"
}
}
}
],
"pagination": {
"limit": 123,
"offset": 123,
"total": 123
}
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}Authorizations
API key authentication
Query Parameters
Merchant whose customer accounts to report Unique identifier for an organization
^org_[a-zA-Z0-9]+$Limit the rows and the totals to these customers of the merchant. A customer of another merchant, or one that does not exist, returns 404. A customer billed in several currencies has a row for each, so set limit to cover them.
1 - 100 elements1Number of rows to return
1 <= x <= 500Number of rows to skip
x >= 0Response
Customer accounts
Object type identifier
list One entry per currency with at least one row in the filter, over every row and not only this page. The merchant's primary currency comes first, then the rest in alphabetical order. Empty when there are no rows.
Show child attributes
Show child attributes
One row per customer and currency with at least one unpaid invoice, in the currency order of totals, then by outstanding.amount descending, then by customerId. A customer billed in two currencies has two rows.
Show child attributes
Show child attributes
Offset-based pagination response.
Show child attributes
Show child attributes
Was this page helpful?