Clients
Stop billing
Stop billing a client. A paid month runs to its end, or ends now with now=true.
DELETE
/
v1
/
accounts
/
{id}
/
billing
Stop billing
curl --request DELETE \
--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.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', 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 => "DELETE",
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("DELETE", 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.delete("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::Delete.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": true
}
}
An unpaid link stops working at once. When billing ends, the client goes back on your plan.
Use your account-wide API key. A client’s own key gets
403 here. See Invoicing.
Path parameters
string
required
The client’s
id.Query parameters
boolean
true ends a paid subscription now instead of at the end of the month.Response
object
With
ends_at_period_end true, or null once it has ended.Example
curl -X DELETE https://www.orgo.ai/api/v1/accounts/$CLIENT_ID/billing?now=true \
-H "Authorization: Bearer $ORGO_API_KEY"
import os
import requests
client_id = os.environ["CLIENT_ID"]
res = requests.delete(
f"https://www.orgo.ai/api/v1/accounts/{client_id}/billing",
headers={"Authorization": f"Bearer {os.environ['ORGO_API_KEY']}"},
params={"now": "true"},
)
print(res.json())
const clientId = process.env.CLIENT_ID;
const res = await fetch(`https://www.orgo.ai/api/v1/accounts/${clientId}/billing?now=true`, {
method: 'DELETE',
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": true
}
}
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. |
Authorizations
API key authentication. Get your key at orgo.ai/workspaces
Path Parameters
The client’s id.
Query Parameters
true ends a paid subscription now instead of at the end of the month.
Response
OK
Show child attributes
Show child attributes
⌘I
Stop billing
curl --request DELETE \
--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.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', 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 => "DELETE",
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("DELETE", 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.delete("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::Delete.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": true
}
}