Advanced Billing
List Pending Charges
List all pending unbilled charges for a subscription.
GET
/
v1
/
subscriptions
/
{id}
/
charges
List unbilled charges for a subscription
curl --request GET \
--url https://billing.example.com/v1/subscriptions/{id}/charges \
--header 'Authorization: Bearer <token>'import requests
url = "https://billing.example.com/v1/subscriptions/{id}/charges"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://billing.example.com/v1/subscriptions/{id}/charges', 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://billing.example.com/v1/subscriptions/{id}/charges",
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://billing.example.com/v1/subscriptions/{id}/charges"
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://billing.example.com/v1/subscriptions/{id}/charges")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/v1/subscriptions/{id}/charges")
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{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subscription_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"currency": "<string>",
"description": "<string>",
"hsn_code": "<string>",
"status": "pending",
"period_start": "2023-11-07T05:31:56Z",
"period_end": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>"
}
}Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | The unique identifier of the subscription (e.g., sub_3jF6RtKmWp). |
status: "pending" that have not yet been invoiced. Once a charge is included on an invoice, it no longer appears in this list.
Example Request
curl -X GET https://api.recurso.io/v1/subscriptions/sub_3jF6RtKmWp/charges \
-H "Authorization: Bearer sk_live_26PHem9AhJZvU..." \
-H "Content-Type: application/json"
Response
{
"object": "list",
"data": [
{
"id": "chrg_6kW2NpTsXv",
"object": "charge",
"status": "pending",
"amount": 7500,
"currency": "usd",
"description": "One-time onboarding fee",
"subscription_id": "sub_3jF6RtKmWp",
"invoice_id": null,
"created_at": "2026-06-23T09:20:00Z",
"updated_at": "2026-06-23T09:20:00Z"
},
{
"id": "chrg_1mR4QvYwBn",
"object": "charge",
"status": "pending",
"amount": 3200,
"currency": "usd",
"description": "Premium support add-on — June 2026",
"subscription_id": "sub_3jF6RtKmWp",
"invoice_id": null,
"created_at": "2026-06-20T16:45:00Z",
"updated_at": "2026-06-20T16:45:00Z"
}
]
}
Authorizations
Tenant API key obtained from POST /auth/register or POST /v1/developer/keys.
Path Parameters
Query Parameters
Max rows returned (clamped to 1000).
Required range:
x <= 1000Rows to skip, for paging past the clamp.
Required range:
x >= 0Response
Pending unbilled charges.
Show child attributes
Show child attributes
⌘I
List unbilled charges for a subscription
curl --request GET \
--url https://billing.example.com/v1/subscriptions/{id}/charges \
--header 'Authorization: Bearer <token>'import requests
url = "https://billing.example.com/v1/subscriptions/{id}/charges"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://billing.example.com/v1/subscriptions/{id}/charges', 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://billing.example.com/v1/subscriptions/{id}/charges",
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://billing.example.com/v1/subscriptions/{id}/charges"
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://billing.example.com/v1/subscriptions/{id}/charges")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://billing.example.com/v1/subscriptions/{id}/charges")
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{
"data": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subscription_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"amount": 123,
"currency": "<string>",
"description": "<string>",
"hsn_code": "<string>",
"status": "pending",
"period_start": "2023-11-07T05:31:56Z",
"period_end": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>"
}
}{
"error": {
"code": "BAD_REQUEST",
"message": "<string>"
}
}