List invoices
curl --request GET \
--url https://api-dashboard.payra.com/v1/invoices \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-dashboard.payra.com/v1/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-dashboard.payra.com/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-dashboard.payra.com/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 => [
"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-dashboard.payra.com/v1/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-dashboard.payra.com/v1/invoices")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dashboard.payra.com/v1/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": [
{
"object": "invoice",
"id": "019e2b4c-7a1d-7c3e-9f20-5b8d4e6a1c31",
"number": "INV-1042",
"external_id": "SO-55512",
"customer": "019e2b4c-7a1d-7c3e-9f20-5b8d4e6a1c30",
"status": "open",
"past_due": false,
"currency": "USD",
"total": 125000,
"amount_paid": 25000,
"amount_pending": 0,
"amount_due": 100000,
"invoice_date": "2026-09-30",
"due_date": "2026-10-30",
"payment_url": "https://dashboard.payra.com/pay/4f8c1d2e3b5a6c7d8e9f0a1b2c3d4e5f",
"livemode": true,
"created_at": "2026-09-30T23:00:40.670Z"
}
],
"has_more": true
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}Invoices
List invoices
Your workspace’s invoices, newest first, drafts left out. Filter by number or external_id to find one invoice, or by customer and status to show a customer what they owe. Each one carries its payment_url while it can be paid.
GET
/
invoices
List invoices
curl --request GET \
--url https://api-dashboard.payra.com/v1/invoices \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-dashboard.payra.com/v1/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-dashboard.payra.com/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-dashboard.payra.com/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 => [
"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-dashboard.payra.com/v1/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-dashboard.payra.com/v1/invoices")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dashboard.payra.com/v1/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": [
{
"object": "invoice",
"id": "019e2b4c-7a1d-7c3e-9f20-5b8d4e6a1c31",
"number": "INV-1042",
"external_id": "SO-55512",
"customer": "019e2b4c-7a1d-7c3e-9f20-5b8d4e6a1c30",
"status": "open",
"past_due": false,
"currency": "USD",
"total": 125000,
"amount_paid": 25000,
"amount_pending": 0,
"amount_due": 100000,
"invoice_date": "2026-09-30",
"due_date": "2026-10-30",
"payment_url": "https://dashboard.payra.com/pay/4f8c1d2e3b5a6c7d8e9f0a1b2c3d4e5f",
"livemode": true,
"created_at": "2026-09-30T23:00:40.670Z"
}
],
"has_more": true
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}{
"error": {
"type": "invalid_request_error",
"code": "<string>",
"message": "<string>",
"request_id": "<string>",
"param": "<string>"
}
}Authorizations
A secret key, sk_test_... or sk_live_...; a publishable key (pk_...) on the browser routes only
Query Parameters
How many to return, 1 to 100.
Required range:
1 <= x <= 100Example:
20
The id of the last invoice of the previous page; the page after it is returned.
Required string length:
1 - 64Example:
"019e2b4c-7a1d-7c3e-9f20-5b8d4e6a1c31"
Only invoices with this number. Usually one; a number can repeat across customers.
Required string length:
1 - 100Example:
"INV-1042"
Only the invoice your ERP knows by this id: at most one.
Required string length:
1 - 100Example:
"SO-55512"
Only this customer's invoices.
Required string length:
1 - 100Example:
"019e2b4c-7a1d-7c3e-9f20-5b8d4e6a1c30"
Available options:
open, paid, canceled Example:
"open"