Clients
Get billing
Whether the client pays you, how much, and when.
GET
/
v1
/
accounts
/
{id}
/
billing
Get billing
curl --request GET \
--url https://www.orgo.ai/api/v1/accounts/{id}/billing \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.orgo.ai/api/v1/accounts/{id}/billing"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.orgo.ai/api/v1/accounts/{id}/billing', 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://www.orgo.ai/api/v1/accounts/{id}/billing",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.orgo.ai/api/v1/accounts/{id}/billing"
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))
}HttpResponse<String> response = Unirest.get("https://www.orgo.ai/api/v1/accounts/{id}/billing")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.orgo.ai/api/v1/accounts/{id}/billing")
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{
"billing": {
"status": "active",
"email": "billing@acme.com",
"price_usd": 250,
"setup_fee_usd": 0,
"ai_usd": 40,
"payment_link_url": null,
"current_period_end": "2026-11-01T09:00:00Z",
"ends_at_period_end": false
}
}
Whether the client pays you, how much, and when.
Use your account-wide API key. A client’s own key gets
403 here. See Invoicing.
Path parameters
string
required
The client’s
id.Response
object
Their billing, or
null while you pay for them.string
sent (link not paid yet), active, or past_due.string
Where the link and receipts go.
number
What they pay each month, before AI.
number
Their monthly AI amount, billed at cost.
0 when none.number
The one-time fee charged with the first month.
string
The link while it waits to be paid, else
null.string
When the paid month ends.
boolean
true once you stop billing: it ends with the paid month.Example
curl https://www.orgo.ai/api/v1/accounts/$CLIENT_ID/billing \
-H "Authorization: Bearer $ORGO_API_KEY"
import os
import requests
client_id = os.environ["CLIENT_ID"]
res = requests.get(
f"https://www.orgo.ai/api/v1/accounts/{client_id}/billing",
headers={"Authorization": f"Bearer {os.environ['ORGO_API_KEY']}"},
)
print(res.json())
const clientId = process.env.CLIENT_ID;
const res = await fetch(`https://www.orgo.ai/api/v1/accounts/${clientId}/billing`, {
headers: { Authorization: `Bearer ${process.env.ORGO_API_KEY}` },
});
console.log(await res.json());
Response
{
"billing": {
"status": "active",
"email": "billing@acme.com",
"price_usd": 250,
"setup_fee_usd": 0,
"ai_usd": 40,
"payment_link_url": null,
"current_period_end": "2026-11-01T09:00:00Z",
"ends_at_period_end": false
}
}
Errors
| Status | Body | Meaning |
|---|---|---|
401 | { "error": "Invalid API key" } | No key, or not one of yours. |
403 | { "error": "Use your account-wide API key to manage accounts. Workspace keys can’t." } | A client’s own key, or any key scoped to one workspace. |
403 | { "error": "Invoicing is on every paid plan. Upgrade to use it." } | You’re on the Free plan. code is UPGRADE_REQUIRED. |
404 | { "error": "Account not found." } | No client with this id is yours. |
409 | { "error": "This account is closed." } | The client is closed. code is ACCOUNT_CLOSED. |
409 | { "error": "This account was transferred to your client." } | The client accepted a transfer and owns it now. code is ACCOUNT_TRANSFERRED. |
⌘I
Get billing
curl --request GET \
--url https://www.orgo.ai/api/v1/accounts/{id}/billing \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.orgo.ai/api/v1/accounts/{id}/billing"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://www.orgo.ai/api/v1/accounts/{id}/billing', 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://www.orgo.ai/api/v1/accounts/{id}/billing",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://www.orgo.ai/api/v1/accounts/{id}/billing"
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))
}HttpResponse<String> response = Unirest.get("https://www.orgo.ai/api/v1/accounts/{id}/billing")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.orgo.ai/api/v1/accounts/{id}/billing")
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{
"billing": {
"status": "active",
"email": "billing@acme.com",
"price_usd": 250,
"setup_fee_usd": 0,
"ai_usd": 40,
"payment_link_url": null,
"current_period_end": "2026-11-01T09:00:00Z",
"ends_at_period_end": false
}
}