Get Billing History
curl --request GET \
--url https://api.example.com/api/v1/workspaces/{workspace_id}/billing/history \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.example.com/api/v1/workspaces/{workspace_id}/billing/history"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.example.com/api/v1/workspaces/{workspace_id}/billing/history', 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.example.com/api/v1/workspaces/{workspace_id}/billing/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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.example.com/api/v1/workspaces/{workspace_id}/billing/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.example.com/api/v1/workspaces/{workspace_id}/billing/history")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/workspaces/{workspace_id}/billing/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"events": [
{
"amount": 123,
"created": "2023-11-07T05:31:56Z",
"currency": "<string>",
"description": "<string>",
"hosted_url": "<string>",
"id": "<string>",
"pdf_url": "<string>",
"status": "<string>",
"type": "invoice"
}
],
"has_more": true,
"next_credit_note_cursor": "<string>",
"next_invoice_cursor": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}billing
Get Billing History
Return a unified, date-desc list of invoices and credit notes for the workspace.
Returns up to 50 of each kind per page. Each source (invoices, credit notes)
paginates independently via Stripe’s native starting_after cursor; callers
thread the returned next_invoice_cursor / next_credit_note_cursor back
as query params to fetch the next page. has_more is true when either
cursor is non-null. Proration line items are embedded in their parent invoice
description — they are NOT emitted as standalone events.
GET
/
api
/
v1
/
workspaces
/
{workspace_id}
/
billing
/
history
Get Billing History
curl --request GET \
--url https://api.example.com/api/v1/workspaces/{workspace_id}/billing/history \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.example.com/api/v1/workspaces/{workspace_id}/billing/history"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.example.com/api/v1/workspaces/{workspace_id}/billing/history', 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.example.com/api/v1/workspaces/{workspace_id}/billing/history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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.example.com/api/v1/workspaces/{workspace_id}/billing/history"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.example.com/api/v1/workspaces/{workspace_id}/billing/history")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/workspaces/{workspace_id}/billing/history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"events": [
{
"amount": 123,
"created": "2023-11-07T05:31:56Z",
"currency": "<string>",
"description": "<string>",
"hosted_url": "<string>",
"id": "<string>",
"pdf_url": "<string>",
"status": "<string>",
"type": "invoice"
}
],
"has_more": true,
"next_credit_note_cursor": "<string>",
"next_invoice_cursor": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
APIKeyHeaderHTTPBearer
