curl --request GET \
--url https://api.goyappr.com/billing/invoices \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/billing/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.goyappr.com/billing/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.goyappr.com/billing/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.goyappr.com/billing/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.goyappr.com/billing/invoices")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/billing/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{
"invoices": [
{
"number": "4F2A9C1B-0007",
"kind": "credits_top_up",
"description": "Credits top-up",
"phone_number": null,
"status": "paid",
"issued_at": "2026-10-21T09:14:02.000Z",
"paid_at": "2026-10-21T09:14:02.000Z",
"currency": "usd",
"net_cents": 5000,
"vat_cents": 900,
"total_cents": 5900,
"refunded_cents": 0,
"lines": [
{
"description": "Credits top-up",
"quantity": 1,
"unit_amount_cents": 5000,
"amount_cents": 5000
},
{
"description": "VAT (18%)",
"quantity": 1,
"unit_amount_cents": 900,
"amount_cents": 900
}
],
"view_url": "https://invoice.stripe.com/i/example",
"pdf_url": "https://pay.stripe.com/invoice/example/pdf"
}
],
"next_cursor": null
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}List Invoices
Every invoice this workspace has been sent, newest first: credit top-ups, automatic
top-ups and phone-number charges (the first month and every renewal). Each one is
emailed to the billing email when it is paid. Required scope billing:read.
Paid, open and uncollectible invoices are listed; a draft is not an invoice yet and a
void one was never owed. view_url is the invoice’s own page and pdf_url downloads
it. Amounts are in cents: total_cents is what was charged, vat_cents the VAT in it,
net_cents the rest, and refunded_cents whatever was paid back.
Follow next_cursor until it is null. A page can hold fewer than limit invoices
while next_cursor is still set; keep following it. Invoices are issued in English.
curl --request GET \
--url https://api.goyappr.com/billing/invoices \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/billing/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.goyappr.com/billing/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.goyappr.com/billing/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.goyappr.com/billing/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.goyappr.com/billing/invoices")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/billing/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{
"invoices": [
{
"number": "4F2A9C1B-0007",
"kind": "credits_top_up",
"description": "Credits top-up",
"phone_number": null,
"status": "paid",
"issued_at": "2026-10-21T09:14:02.000Z",
"paid_at": "2026-10-21T09:14:02.000Z",
"currency": "usd",
"net_cents": 5000,
"vat_cents": 900,
"total_cents": 5900,
"refunded_cents": 0,
"lines": [
{
"description": "Credits top-up",
"quantity": 1,
"unit_amount_cents": 5000,
"amount_cents": 5000
},
{
"description": "VAT (18%)",
"quantity": 1,
"unit_amount_cents": 900,
"amount_cents": 900
}
],
"view_url": "https://invoice.stripe.com/i/example",
"pdf_url": "https://pay.stripe.com/invoice/example/pdf"
}
],
"next_cursor": null
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"path": "<string>"
}
]
}billing:read, so a key made for bookkeeping can
read invoices without being able to top up or change anything.
Every payment comes with one invoice, emailed to the workspace’s billing email
when it is paid: a credit top-up, an automatic top-up, and a phone number’s
first and every monthly charge. What the invoices print about you is set with
PATCH /billing/details.
curl "https://api.goyappr.com/billing/invoices?limit=20" \
-H "Authorization: Bearer $YAPPR_API_KEY"
{
"invoices": [
{
"number": "4F2A9C1B-0007",
"kind": "credits_top_up",
"description": "Credits top-up",
"phone_number": null,
"status": "paid",
"issued_at": "2026-10-21T08:03:44.000Z",
"paid_at": "2026-10-21T08:03:44.000Z",
"currency": "usd",
"net_cents": 5000,
"vat_cents": 900,
"total_cents": 5900,
"refunded_cents": 0,
"lines": [
{ "description": "Credits top-up", "quantity": 1, "unit_amount_cents": 5000, "amount_cents": 5000 },
{ "description": "VAT (18%)", "quantity": 1, "unit_amount_cents": 900, "amount_cents": 900 }
],
"view_url": "https://invoice.stripe.com/i/EXAMPLE",
"pdf_url": "https://pay.stripe.com/invoice/EXAMPLE/pdf"
}
],
"next_cursor": "aW5fZXhhbXBsZQ"
}
Query
| Parameter | Default | What it does |
|---|---|---|
limit | 20 | How many invoices, 1 to 100. Anything else is 400 INVOICE_LIMIT_INVALID. |
cursor | — | The next_cursor of the previous page, to read the page after it. A cursor this endpoint did not give is 400 INVOICE_CURSOR_INVALID. |
next_cursor is null on the last page. A page can hold fewer than limit
invoices and still have a next_cursor: keep reading until it is null.
The fields
| Field | What it is |
|---|---|
number | The invoice number printed on it, for your books. |
kind | What it was for: credits_top_up, auto_top_up, phone_number or other. |
description | The first line’s description, as the invoice prints it (in English). |
phone_number | The number a phone_number invoice was for, in E.164; null for every other kind. |
status | paid, open (issued and not paid yet) or uncollectible (could not be collected). |
issued_at, paid_at | When it was issued, and when it was paid (null until it is). |
currency | Lower-case currency code, such as usd. |
net_cents, vat_cents, total_cents | The amount before VAT, the VAT, and the total, in the currency’s cents. net_cents + vat_cents = total_cents. |
refunded_cents | How much of the payment was refunded; 0 when none was. |
lines | Each line as printed: description, quantity, unit amount and amount. |
view_url, pdf_url | The invoice online, and its PDF. Hand them to whoever keeps your books. |
Errors
| HTTP | code | When |
|---|---|---|
400 | INVOICE_LIMIT_INVALID | limit is not a whole number from 1 to 100. |
400 | INVOICE_CURSOR_INVALID | cursor is not one this endpoint gave. |
403 | INSUFFICIENT_SCOPE | The key does not hold billing:read. |
502 | BILLING_UNAVAILABLE | The invoices could not be reached. Try again in a minute. |
Authorizations
Your Yappr API key (e.g. ypr_live_...). Generate one in the dashboard under Settings → API Keys. No key is 401 MISSING_KEY; a key that is not one of ours, or is revoked, is 401 INVALID_KEY; an expired one is 401 EXPIRED_KEY. A valid key without the scope an operation needs is 403 INSUFFICIENT_SCOPE on every operation, and the message names the scope. Every response, a 401 included, carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset: the budget is 60 requests a minute per API key. Every 429, whatever its code, carries Retry-After (whole seconds, never zero): the per-key budget's RATE_LIMIT asks for what is left of the minute, a route's daily cap (RATE_LIMITED) for the time until that cap resets. All four headers are listed in Access-Control-Expose-Headers, so a browser can read them. A path the API does not serve (an unknown sub-path, an id left empty) is 404 ROUTE_NOT_FOUND, and a method a served path does not take is 405 METHOD_NOT_ALLOWED with an Allow header; both are answered before any scope check, and nothing is read or changed. A trailing slash is ignored where it cannot be an id left empty (POST /calls/ is POST /calls) and refused where it can (GET /calls/). A doubled slash inside a path is merged into one before the request reaches the API (GET //calls is GET /calls).