Get Subscription
curl --request GET \
--url https://api.example.com/billing/subscriptionimport requests
url = "https://api.example.com/billing/subscription"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/billing/subscription', 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.example.com/billing/subscription",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/billing/subscription"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/billing/subscription")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/billing/subscription")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"plan": {},
"status": {},
"cancel_at_period_end": true,
"current_period_end": {},
"credits_remaining": 123,
"credits_topup_balance": 123,
"coupon_credits_balance": 123,
"has_access": true
}Billing
Get Subscription
Retrieve the active team’s subscription plan and credit balance.
GET
/
billing
/
subscription
Get Subscription
curl --request GET \
--url https://api.example.com/billing/subscriptionimport requests
url = "https://api.example.com/billing/subscription"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/billing/subscription', 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.example.com/billing/subscription",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/billing/subscription"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/billing/subscription")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/billing/subscription")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"plan": {},
"status": {},
"cancel_at_period_end": true,
"current_period_end": {},
"credits_remaining": 123,
"credits_topup_balance": 123,
"coupon_credits_balance": 123,
"has_access": true
}Returns the team’s current subscription — plan details, Stripe status, and credit balances (monthly, purchased top-ups, coupon). Agents can call this to check whether a team is billable before enqueuing an expensive job.
Resolves to the team selected by the authenticated caller’s session. API-key callers are scoped to the team that owns the key.
Response
200
{
"plan": {
"id": "plan-uuid",
"slug": "pro",
"name": "Pro",
"description": "For growing creators",
"price_cents": 2900,
"currency": "usd",
"monthly_credits": 500,
"allowed_models": ["fal:nano-banana-pro", "fal:kling-v2.5-pro"],
"allowed_features": ["influencer", "slides"],
"is_active": true,
"sort_order": 20
},
"status": "active",
"cancel_at_period_end": false,
"current_period_end": "2026-05-21T12:00:00Z",
"credits_remaining": 342,
"credits_topup_balance": 1000,
"coupon_credits_balance": 0,
"has_access": true
}
Fields
object | null
The plan row.
null when the team has never had a subscription. See
List Plans for the full plan shape.string | null
Stripe subscription status. One of
trialing, active, past_due,
canceled, unpaid, incomplete, incomplete_expired, paused.boolean
true when the subscription will not auto-renew at
current_period_end.string | null
ISO-8601 timestamp of the next renewal. Also the date at which
monthly credits reset.
integer
Monthly-plan credits left in the current period. Resets on renewal.
integer
Purchased top-up credits. Non-expiring. Spent AFTER the monthly
balance depletes.
integer
Promotional credits from claimed coupons. Non-expiring.
boolean
Computed:
true when status ∈ (active, trialing, past_due) AND
current_period_end is in the future. Use this to decide whether a
team can generate, not status alone.Example
cURL
curl https://api.supapost.so/billing/subscription \
-H "Authorization: Bearer YOUR_API_KEY"