Billing
List invoices
The team’s monthly invoices, newest first, all at once (not paginated). Each UTC month that had usage gets one, charged to the card on file.
GET
/
v1
/
billing
/
invoices
List invoices
curl --request GET \
--url https://api.offstage.cloud/v1/billing/invoices \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.offstage.cloud/v1/billing/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.offstage.cloud/v1/billing/invoices"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"invoices": [
{
"id": "<string>",
"number": "<string>",
"period": "<string>",
"createdAt": 1,
"subtotalUsd": 123,
"creditUsd": 123,
"carriedUsd": 123,
"totalUsd": 123,
"status": "paid",
"hostedUrl": "<string>",
"lines": [
{
"description": "<string>",
"amountUsd": 123
}
],
"failureMessage": "<string>"
}
]
}{
"error": {
"code": "sandbox-closed",
"message": "sandbox sbx_mh3k2f9aQ1xYz0aBcDeFgHiJ is closed (idle)",
"fix": "create a new sandbox",
"requestId": "req_mh3k2f9aQ1xYz0aBcDeFgHiJ"
}
}{
"error": {
"code": "sandbox-closed",
"message": "sandbox sbx_mh3k2f9aQ1xYz0aBcDeFgHiJ is closed (idle)",
"fix": "create a new sandbox",
"requestId": "req_mh3k2f9aQ1xYz0aBcDeFgHiJ"
}
}⌘I
List invoices
curl --request GET \
--url https://api.offstage.cloud/v1/billing/invoices \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.offstage.cloud/v1/billing/invoices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.offstage.cloud/v1/billing/invoices"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"invoices": [
{
"id": "<string>",
"number": "<string>",
"period": "<string>",
"createdAt": 1,
"subtotalUsd": 123,
"creditUsd": 123,
"carriedUsd": 123,
"totalUsd": 123,
"status": "paid",
"hostedUrl": "<string>",
"lines": [
{
"description": "<string>",
"amountUsd": 123
}
],
"failureMessage": "<string>"
}
]
}{
"error": {
"code": "sandbox-closed",
"message": "sandbox sbx_mh3k2f9aQ1xYz0aBcDeFgHiJ is closed (idle)",
"fix": "create a new sandbox",
"requestId": "req_mh3k2f9aQ1xYz0aBcDeFgHiJ"
}
}{
"error": {
"code": "sandbox-closed",
"message": "sandbox sbx_mh3k2f9aQ1xYz0aBcDeFgHiJ is closed (idle)",
"fix": "create a new sandbox",
"requestId": "req_mh3k2f9aQ1xYz0aBcDeFgHiJ"
}
}