Renewal date, payment failures, a pending cancellation and invoices, from Stripe
curl --request GET \
--url https://app.hookie.ai/admin/api/billing/details \
--cookie hookie_session=const options = {method: 'GET', headers: {cookie: 'hookie_session='}};
fetch('https://app.hookie.ai/admin/api/billing/details', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/billing/details"
headers = {"cookie": "hookie_session="}
response = requests.get(url, headers=headers)
print(response.text){
"plan": "free",
"subscription": {
"id": "<string>",
"status": "<string>",
"plan": "<string>",
"quantity": 123,
"current_period_end": "<string>",
"cancel_at_period_end": true,
"cancel_at": "<string>",
"payment_failed": true,
"cancel_pending": true,
"renews_at": "<string>",
"ends_at": "<string>"
},
"invoices": [
{
"id": "<string>",
"number": "<string>",
"status": "<string>",
"amount_due": 123,
"amount_paid": 123,
"currency": "usd",
"created": "<string>",
"hosted_invoice_url": "<string>",
"invoice_pdf": "<string>"
}
],
"unpaid_invoice": {
"id": "<string>",
"number": "<string>",
"status": "<string>",
"amount_due": 123,
"amount_paid": 123,
"currency": "usd",
"created": "<string>",
"hosted_invoice_url": "<string>",
"invoice_pdf": "<string>"
},
"live": true,
"stripe_error": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true
}Billing
Renewal date, payment failures, a pending cancellation and invoices, from Stripe
Owner only (a connected agent is never the owner). Reads the workspace’s subscription and its Stripe customer’s 12 most recent invoices live from Stripe with the server’s key, which never leaves the Worker. When Stripe is not configured or cannot be reached it answers with the state the webhook stored, live: false, and no invoices.
GET
/
admin
/
api
/
billing
/
details
Renewal date, payment failures, a pending cancellation and invoices, from Stripe
curl --request GET \
--url https://app.hookie.ai/admin/api/billing/details \
--cookie hookie_session=const options = {method: 'GET', headers: {cookie: 'hookie_session='}};
fetch('https://app.hookie.ai/admin/api/billing/details', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/billing/details"
headers = {"cookie": "hookie_session="}
response = requests.get(url, headers=headers)
print(response.text){
"plan": "free",
"subscription": {
"id": "<string>",
"status": "<string>",
"plan": "<string>",
"quantity": 123,
"current_period_end": "<string>",
"cancel_at_period_end": true,
"cancel_at": "<string>",
"payment_failed": true,
"cancel_pending": true,
"renews_at": "<string>",
"ends_at": "<string>"
},
"invoices": [
{
"id": "<string>",
"number": "<string>",
"status": "<string>",
"amount_due": 123,
"amount_paid": 123,
"currency": "usd",
"created": "<string>",
"hosted_invoice_url": "<string>",
"invoice_pdf": "<string>"
}
],
"unpaid_invoice": {
"id": "<string>",
"number": "<string>",
"status": "<string>",
"amount_due": 123,
"amount_paid": 123,
"currency": "usd",
"created": "<string>",
"hosted_invoice_url": "<string>",
"invoice_pdf": "<string>"
},
"live": true,
"stripe_error": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true
}Authorizations
sessionbearerAuthapiKey
Response
The subscription as Plan & billing shows it.