> 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/list-invoices/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.finput.com.au/_mcp/server. # List recent invoices GET https://api.finput.com.au/api/v1/billing/invoices The last 12 invoices, read live from Stripe — nothing is stored locally. For full history, send the user to the customer portal via `POST /api/v1/billing/portal-session`. Broker admins only, matching how the portal itself is gated. Reference: https://docs.finput.com.au/api/endpoints/billing/list-invoices ## 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 invoices, newest first. An empty array when the organisation has no Stripe customer yet. - `invoices` (list of Invoice, optional) ## Errors ### 403 Forbidden Error Not a broker admin. - `error` (string, optional) - `errors` (map from string to list of string, optional) ### 502 Bad Gateway Error Stripe could not be reached. - `error` (string, optional) - `errors` (map from string to list of string, optional) ## Types ### Invoice A projection of the Stripe invoice — only the fields the billing screen renders. - `id` (string, optional) - `number` (string, optional, nullable) - `status` (string, optional, nullable) - `amount_due` (integer, optional) - `amount_paid` (integer, optional) - `currency` (string, optional) - `created` (integer, optional) — Unix timestamp, seconds. - `period_start` (integer, optional) - `period_end` (integer, optional) - `hosted_invoice_url` (string, optional, nullable) - `invoice_pdf` (string, optional, nullable) ## Examples **Response** ```json { "invoices": [ { "id": "string", "number": "string", "status": "string", "amount_due": 1, "amount_paid": 1, "currency": "string", "created": 1, "period_start": 1, "period_end": 1, "hosted_invoice_url": "string", "invoice_pdf": "string" } ] } ``` **SDK Code** ```python import requests url = "https://api.finput.com.au/api/v1/billing/invoices" headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.finput.com.au/api/v1/billing/invoices'; 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/invoices" 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/invoices") 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/invoices") .header("Authorization", "Bearer ") .asString(); ``` ```php request('GET', 'https://api.finput.com.au/api/v1/billing/invoices', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.finput.com.au/api/v1/billing/invoices"); 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/invoices")! 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() ```