Billing
List credit bought
Every payment that became credit, newest first: when, how much, whether auto-reload charged it, and Stripe’s receipt when Stripe gave one.
GET
/
v1
/
billing
/
purchases
List credit bought
curl --request GET \
--url https://api.offstage.cloud/v1/billing/purchases \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.offstage.cloud/v1/billing/purchases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.offstage.cloud/v1/billing/purchases"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"purchases": [
{
"id": "<string>",
"at": 1,
"amountUsd": 123,
"auto": true,
"receiptUrl": "<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 credit bought
curl --request GET \
--url https://api.offstage.cloud/v1/billing/purchases \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.offstage.cloud/v1/billing/purchases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.offstage.cloud/v1/billing/purchases"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"purchases": [
{
"id": "<string>",
"at": 1,
"amountUsd": 123,
"auto": true,
"receiptUrl": "<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"
}
}