Current Plan
curl --request GET \
--url https://api.60db.ai/billing/current-plan \
--header 'Authorization: <authorization>'import requests
url = "https://api.60db.ai/billing/current-plan"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.60db.ai/billing/current-plan', 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.60db.ai/billing/current-plan",
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: <authorization>"
],
]);
$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.60db.ai/billing/current-plan"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.60db.ai/billing/current-plan")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.60db.ai/billing/current-plan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data.plan.slug": "<string>",
"data.plan.billing_cycle": "<string>",
"data.plan.cancel_at_period_end": true,
"data.plan.next_credit_reset_at": {},
"data.plan.next_payment_at": {},
"data.plan.next_payment_usd": {},
"data.credits": {}
}Billing
Current Plan
The workspace plan, billing cycle, next credit reset, next payment and credit balance
GET
/
billing
/
current-plan
Current Plan
curl --request GET \
--url https://api.60db.ai/billing/current-plan \
--header 'Authorization: <authorization>'import requests
url = "https://api.60db.ai/billing/current-plan"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.60db.ai/billing/current-plan', 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.60db.ai/billing/current-plan",
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: <authorization>"
],
]);
$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.60db.ai/billing/current-plan"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.60db.ai/billing/current-plan")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.60db.ai/billing/current-plan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data.plan.slug": "<string>",
"data.plan.billing_cycle": "<string>",
"data.plan.cancel_at_period_end": true,
"data.plan.next_credit_reset_at": {},
"data.plan.next_payment_at": {},
"data.plan.next_payment_usd": {},
"data.credits": {}
}Returns the workspace’s current plan, billing cycle and balances. Use it to show the next credit reset and the next payment separately. On a yearly plan these are different dates: credits reset every month, and payment is once a year.
Request
Headers
string
required
Bearer token (JWT or API key)
Response
string
Current plan slug, for example
free, starter, creator or prostring
monthly, yearly or freeboolean
true when the plan ends at the end of the current periodstring | null
When plan credits next reset (ISO 8601). Monthly for yearly plans
string | null
When the next charge happens.
null for free plans and cancelled plansnumber | null
Amount of the next charge. For a yearly plan this is the yearly price. Returned only to the workspace owner
object
remaining_credits, granted_credits, remaining_usd, granted_usd and resets_at for the plan credits