> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.finput.com.au/api/endpoints/billing/get-subscription/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.finput.com.au/_mcp/server. # Read the organisation's subscription GET https://api.finput.com.au/api/v1/billing/subscription `subscription` is `null` when the organisation has never subscribed, or has only an abandoned checkout on file. That is the normal state for a Free organisation, not an error. Reference: https://docs.finput.com.au/api/endpoints/billing/get-subscription ## Authentication - `Authorization` header (bearer token, required) — JWT access token obtained from `POST /api/v1/auth/login`, or a `finput_sk_...` API token ## Response ### 200 The subscription, or null. - `subscription` (Subscription, optional, nullable) ## Errors ### 401 Unauthorized Error Not authenticated. - `error` (string, optional) - `errors` (map from string to list of string, optional) ## Types ### Subscription - `plan` (enum, optional) - Allowed values: `free`, `pro`, `max`, `team`, `enterprise` - `plan_name` (string, optional) - `status` (enum, optional) - Allowed values: `trialing`, `active`, `past_due`, `canceled`, `incomplete`, `incomplete_expired`, `unpaid`, `paused` - `seats` (integer, optional) - `trial_end` (datetime, optional, nullable) - `current_period_end` (datetime, optional, nullable) - `cancel_at_period_end` (boolean, optional) - `card_brand` (string, optional, nullable) - `card_last4` (string, optional, nullable) ## Examples **Response** ```json { "subscription": { "plan": "free", "plan_name": "string", "status": "trialing", "seats": 1, "trial_end": "2024-01-15T09:30:00Z", "current_period_end": "2024-01-15T09:30:00Z", "cancel_at_period_end": true, "card_brand": "string", "card_last4": "string" } } ``` **SDK Code** ```python import requests url = "https://api.finput.com.au/api/v1/billing/subscription" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.finput.com.au/api/v1/billing/subscription'; const options = {method: 'GET', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.finput.com.au/api/v1/billing/subscription" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.finput.com.au/api/v1/billing/subscription") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.finput.com.au/api/v1/billing/subscription") .header("Authorization", "Bearer ") .asString(); ``` ```php request('GET', 'https://api.finput.com.au/api/v1/billing/subscription', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.finput.com.au/api/v1/billing/subscription"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.finput.com.au/api/v1/billing/subscription")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```