curl --request GET \
--url https://api.goyappr.com/billing/details \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/billing/details"
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/details', 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/details",
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/details"
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/details")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/billing/details")
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{
"name": "Acme Ltd",
"email": "billing@acme.example",
"address": {
"line1": "1 Example St",
"line2": null,
"city": "Tel Aviv",
"state": null,
"postal_code": "6100000",
"country": "IL"
},
"tax_id": {
"type": "il_vat",
"value": "000012345"
},
"language": "he"
}{
"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>"
}
]
}Get Billing Details
What every invoice prints, and where it is emailed: the business name, the address
invoices are sent to, the postal address, the tax ID (VAT or company number), and the
invoice language. Required scope billing:manage: the full email, the address and the
tax ID are personal data, so a billing:read key that reads the balance and the
invoices does not read these.
A workspace that has never paid reads the details its first invoice would use: the workspace name, the workspace owner’s email, no address, no tax ID, English. Nothing is created by reading.
Invoices are issued in English. A workspace that works in Hebrew (language: he) gets
English invoices with day-first dates.
curl --request GET \
--url https://api.goyappr.com/billing/details \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.goyappr.com/billing/details"
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/details', 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/details",
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/details"
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/details")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goyappr.com/billing/details")
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{
"name": "Acme Ltd",
"email": "billing@acme.example",
"address": {
"line1": "1 Example St",
"line2": null,
"city": "Tel Aviv",
"state": null,
"postal_code": "6100000",
"country": "IL"
},
"tax_id": {
"type": "il_vat",
"value": "000012345"
},
"language": "he"
}{
"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:manage. A key without that scope is 403 INSUFFICIENT_SCOPE.
Every payment the workspace makes — a credit top-up, an automatic top-up, a
phone number’s first and monthly charge — comes with one invoice, emailed to
email when it is paid. These details are what that invoice says about you.
Set them with PATCH /billing/details;
read the invoices themselves with GET /billing/invoices.
curl "https://api.goyappr.com/billing/details" \
-H "Authorization: Bearer $YAPPR_API_KEY"
{
"name": "Acme Ltd",
"email": "billing@acme.example",
"address": {
"line1": "1 Example St",
"line2": null,
"city": "Tel Aviv",
"state": null,
"postal_code": "6100000",
"country": "IL"
},
"tax_id": { "type": "il_vat", "value": "000012345" },
"language": "he"
}
| Field | What it is |
|---|---|
name | The business or legal name printed on invoices. |
email | Where invoices are emailed. |
address | The postal address printed on invoices, or null when none is set. country is a two-letter code such as IL. |
tax_id | The VAT or company number printed on invoices, or null. type says what kind of number it is (see the types). |
language | en or he: the workspace’s language for its invoices. |
Before anything is set
A workspace that has never set its details reads the ones its invoices would use: the workspace’s name, the workspace owner’s email, no address, no tax ID, anden. Reading them changes nothing.
Invoices are issued in English
Invoices, receipts and their emails are in English whateverlanguage says.
he prints dates day first, the way they are read in Israel.
The full email address is personal data, which is why this read needs
billing:manage: GET /billing shows a
billing:read key only a masked billing_email.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).
Response
The billing details