Billing Status
curl --request GET \
--url https://api.nozle.app/engine/api/v1/billing/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nozle.app/engine/api/v1/billing/status"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nozle.app/engine/api/v1/billing/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nozle.app/engine/api/v1/billing/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.nozle.app/engine/api/v1/billing/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nozle.app/engine/api/v1/billing/status",
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: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.nozle.app/engine/api/v1/billing/status")
.header("Authorization", "Bearer <token>")
.asString();{
"plan": "<string>",
"planName": "<string>",
"status": "<string>",
"interval": "<string>",
"amount_cents": 123,
"currency": "<string>"
}Checkout & Subscriptions
Billing Status
GET
/
engine
/
api
/
v1
/
billing
/
status
Billing Status
curl --request GET \
--url https://api.nozle.app/engine/api/v1/billing/status \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.nozle.app/engine/api/v1/billing/status"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.nozle.app/engine/api/v1/billing/status', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.nozle.app/engine/api/v1/billing/status"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.nozle.app/engine/api/v1/billing/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.nozle.app/engine/api/v1/billing/status",
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: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.nozle.app/engine/api/v1/billing/status")
.header("Authorization", "Bearer <token>")
.asString();{
"plan": "<string>",
"planName": "<string>",
"status": "<string>",
"interval": "<string>",
"amount_cents": 123,
"currency": "<string>"
}Base URL:
https://api.nozle.app/engine/api/v1.
Get the plan of a customer’s active subscription. If the customer has several active subscriptions, Nozle uses the one that started most recently.
Auth: secret key only. Publishable keys are always rejected.
string
required
External customer ID derived by the trusted merchant backend.
Response
{
"plan": "pro",
"planName": "Pro",
"status": "active",
"interval": "monthly",
"amount_cents": 4900,
"currency": "USD"
}
string
required
Plan code of the active subscription.
string
required
The plan’s display name. Falls back to the plan code when the plan has no name.
string
required
Always
active. Only active subscriptions are read.string
required
The plan’s billing interval:
weekly, monthly, yearly, quarterly or semiannual.integer
required
The plan’s base amount, in the currency’s smallest unit.
string
required
The plan’s currency.
Errors
| Status | Meaning |
|---|---|
400 | customer_id is missing. |
404 | The customer has no active subscription, or the lookup failed. |
Also available as
GET /subscriptions/current (alias).Your customers’ status has only the fields above. Usage fields such as
events_used and mrr_tracked_usd_cents appear only in Nozle’s status of your own workspace on its Nozle plan. See Plan status fields.