List Invoices
curl --request GET \
--url https://api.viarosandbox.com/v1/invoices \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.viarosandbox.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.viarosandbox.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.viarosandbox.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.viarosandbox.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.viarosandbox.com/v1/invoices")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.viarosandbox.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_bodyInvoices & Billing
List Invoices
Returns a list of invoices issued by your business.
GET
/
invoices
List Invoices
curl --request GET \
--url https://api.viarosandbox.com/v1/invoices \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.viarosandbox.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.viarosandbox.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.viarosandbox.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.viarosandbox.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.viarosandbox.com/v1/invoices")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.viarosandbox.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_bodyReturns a paginated list of invoices. Invoices are returned in reverse chronological order.
Query Parameters
integer
default:"10"
A limit on the number of objects to be returned, between
1 and 100.string
Filter invoices by status:
draft, open, paid, uncollectible, or void.string
The ID of the customer whose invoices you want to retrieve.
Code Examples
curl -G https://api.viarosandbox.com/v1/invoices \
-u sk_test_uLsofsae3tB9Izwgeuy0Mxbh4JIxUPSG: \
-d limit=10
import requests
url = "https://api.viarosandbox.com/v1/invoices"
auth = ("sk_test_uLsofsae3tB9Izwgeuy0Mxbh4JIxUPSG", "")
response = requests.get(url, auth=auth, params={"limit": 10})
print(response.json())
const axios = require('axios');
async function listInvoices() {
const response = await axios.get('https://api.viarosandbox.com/v1/invoices', {
auth: {
username: 'sk_test_uLsofsae3tB9Izwgeuy0Mxbh4JIxUPSG',
password: ''
},
params: { limit: 10 }
});
console.log(response.data);
}
listInvoices();
Response
{
"object": "list",
"data": [
{
"id": "in_1a2b3c4d5e6f",
"object": "invoice",
"customer": "cus_9f1a2b3c4d5e",
"amount_due": 75000,
"amount_paid": 75000,
"currency": "XAF",
"status": "paid",
"description": "Enterprise consulting retainer - November 2026",
"hosted_invoice_url": "https://invoice.viarosandbox.com/i/in_1a2b3c4d5e6f",
"created_at": "2026-11-06T12:00:00Z"
}
],
"has_more": false
}

