Clients
List payments
A client’s recent payments, newest first.
GET
/
v1
/
accounts
/
{id}
/
billing
/
payments
List payments
curl --request GET \
--url https://www.orgo.ai/api/v1/accounts/{id}/billing/payments \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.orgo.ai/api/v1/accounts/{id}/billing/payments"
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/payments', 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/payments",
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/payments"
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/payments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.orgo.ai/api/v1/accounts/{id}/billing/payments")
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{
"payments": [
{
"id": "in_1UMk8rBw6QMtXnMR",
"date": "2026-10-01T09:00:00Z",
"amount_usd": 290,
"status": "paid"
}
]
}A client’s recent payments, newest first.
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
array
Recent payments.
string
The payment id. Use it to refund.
string
ISO 8601 timestamp.
number
What they paid.
string
paid, refunded, partly_refunded, open, or failed.Example
curl https://www.orgo.ai/api/v1/accounts/$CLIENT_ID/billing/payments \
-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/payments",
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/payments`, {
headers: { Authorization: `Bearer ${process.env.ORGO_API_KEY}` },
});
console.log(await res.json());
Response
{
"payments": [
{
"id": "in_1UMk8rBw6QMtXnMR",
"date": "2026-10-01T09:00:00Z",
"amount_usd": 290,
"status": "paid"
}
]
}
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. |
⌘I
List payments
curl --request GET \
--url https://www.orgo.ai/api/v1/accounts/{id}/billing/payments \
--header 'Authorization: Bearer <token>'import requests
url = "https://www.orgo.ai/api/v1/accounts/{id}/billing/payments"
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/payments', 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/payments",
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/payments"
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/payments")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.orgo.ai/api/v1/accounts/{id}/billing/payments")
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{
"payments": [
{
"id": "in_1UMk8rBw6QMtXnMR",
"date": "2026-10-01T09:00:00Z",
"amount_usd": 290,
"status": "paid"
}
]
}