Get subscription details
curl --request GET \
--url https://api.truthlocks.com/v1/billing/subscription \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/billing/subscription', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/billing/subscription"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/billing/subscription"
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))
}{
"id": "<string>",
"plan": "<string>",
"status": "<string>",
"current_period_end": "<string>"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Billing
Get subscription
Returns the current subscription status and plan for the authenticated tenant.
GET
/
v1
/
billing
/
subscription
Get subscription details
curl --request GET \
--url https://api.truthlocks.com/v1/billing/subscription \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/billing/subscription', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/billing/subscription"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/billing/subscription"
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))
}{
"id": "<string>",
"plan": "<string>",
"status": "<string>",
"current_period_end": "<string>"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}GET /v1/billing/subscription
Response
string
Subscription status:
active, past_due, canceled, or trialing.string
The active plan identifier (e.g.,
plan_starter, plan_business).string
ISO 8601 timestamp for when the current billing period ends.
boolean
Whether the subscription is set to cancel at the end of the current period.
To see detailed usage counters for the current billing cycle, use the usage endpoint.

