List
curl --request GET \
--url https://api.paygentic.io/v2/invoices \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paygentic.io/v2/invoices"
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/v2/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.paygentic.io/v2/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 => [
"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/v2/invoices"
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/v2/invoices")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v2/invoices")
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",
"data": [
{
"id": "inv_b5c6d7e8f9g0h1i2",
"autoApprove": true,
"billingAnchor": "2024-03-01T00:00:00Z",
"billingCadence": "P1M",
"gracePeriodEnd": "2024-04-01T23:59:59Z",
"grandTotal": "0.00",
"invoiceNumber": null,
"itemCount": 0,
"lineItems": null,
"nextActionAt": null,
"paidAmount": "0.00",
"paymentUrl": null,
"pdfUrl": null,
"pdfSource": null,
"documentWithheldReason": null,
"periodEnd": "2024-03-31T23:59:59Z",
"periodStart": "2024-03-01T00:00:00Z",
"permalink": null,
"sequenceNumber": 1,
"status": "ACTIVE",
"subscriptionId": "sub_j3k4l5m6n7o8p9q0",
"subtotal": "0.00",
"tax": null,
"totalTax": "0.00",
"unpaidAmount": "0.00"
}
],
"pagination": {
"limit": 10,
"offset": 0,
"total": 1
}
}{
"message": "The requested resource was not found",
"error": "not_found"
}{
"message": "The requested resource was not found",
"error": "not_found"
}Invoices V2
List
List invoices with optional filters. Platform users can use nextActionAt=ready to get invoices ready for processing.
GET
/
v2
/
invoices
List
curl --request GET \
--url https://api.paygentic.io/v2/invoices \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.paygentic.io/v2/invoices"
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/v2/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.paygentic.io/v2/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 => [
"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/v2/invoices"
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/v2/invoices")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paygentic.io/v2/invoices")
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",
"data": [
{
"id": "inv_b5c6d7e8f9g0h1i2",
"autoApprove": true,
"billingAnchor": "2024-03-01T00:00:00Z",
"billingCadence": "P1M",
"gracePeriodEnd": "2024-04-01T23:59:59Z",
"grandTotal": "0.00",
"invoiceNumber": null,
"itemCount": 0,
"lineItems": null,
"nextActionAt": null,
"paidAmount": "0.00",
"paymentUrl": null,
"pdfUrl": null,
"pdfSource": null,
"documentWithheldReason": null,
"periodEnd": "2024-03-31T23:59:59Z",
"periodStart": "2024-03-01T00:00:00Z",
"permalink": null,
"sequenceNumber": 1,
"status": "ACTIVE",
"subscriptionId": "sub_j3k4l5m6n7o8p9q0",
"subtotal": "0.00",
"tax": null,
"totalTax": "0.00",
"unpaidAmount": "0.00"
}
],
"pagination": {
"limit": 10,
"offset": 0,
"total": 1
}
}{
"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
Maximum number of invoices to return
Required range:
1 <= x <= 100Number of invoices to skip for pagination
Required range:
0 <= x <= 10000Filter for invoices ready for processing (platform only)
Available options:
ready Filter invoices by status
Available options:
ACTIVE, CLOSING, CLOSED, CALCULATING, DRAFT, ISSUED, PAYMENT_FAILED, PAID, CANCELLED, WRITTEN_OFF, FAILED Filter invoices by subscription ID Unique identifier for a subscription
Pattern:
^sub_[a-zA-Z0-9]+$Filter invoices by customer ID. Authorizes against the customer's merchant; takes precedence as the merchant source when combined with other filters. Unique identifier for a customer
Pattern:
^cus_[a-zA-Z0-9]+$Filter invoices by merchant ID Unique identifier for an organization
Pattern:
^org_[a-zA-Z0-9]+$Was this page helpful?