Billing
Preview the next invoice
Previews your plan’s next renewal charge (no id, number or links yet). No subscription, or one that won’t renew: 404.
GET
/
invoices
/
upcoming
Preview the next invoice
curl --request GET \
--url https://api.followr.ai/api/invoices/upcoming \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.followr.ai/api/invoices/upcoming"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.followr.ai/api/invoices/upcoming', 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://api.followr.ai/api/invoices/upcoming",
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;
}{
"data": {
"object": "invoice",
"number": null,
"status": "draft",
"paid": false,
"currency": "usd",
"subtotal": 3900,
"total": 3900,
"amount_due": 3900,
"amount_paid": 0,
"amount_remaining": 3900,
"created": 1796083200,
"period_start": 1794657600,
"period_end": 1797249600,
"next_payment_attempt": 1797253200,
"customer": "cus_PqR7sT8uV9wX0y",
"customer_email": "[email protected]",
"subscription": "sub_1QhT7sK2mN4pX8vZ",
"hosted_invoice_url": null,
"invoice_pdf": null,
"lines": {
"object": "list",
"has_more": false,
"data": [
{
"id": "il_tmp_1QkR4tK2mN4pX8vZc9D0e1F2",
"object": "line_item",
"description": "1 × Team (at $39.00 / month)",
"amount": 3900,
"currency": "usd",
"quantity": 1,
"period": {
"start": 1797249600,
"end": 1799928000
}
}
]
}
}
}Authorizations
⌘I
Preview the next invoice
curl --request GET \
--url https://api.followr.ai/api/invoices/upcoming \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.followr.ai/api/invoices/upcoming"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.followr.ai/api/invoices/upcoming', 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://api.followr.ai/api/invoices/upcoming",
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;
}{
"data": {
"object": "invoice",
"number": null,
"status": "draft",
"paid": false,
"currency": "usd",
"subtotal": 3900,
"total": 3900,
"amount_due": 3900,
"amount_paid": 0,
"amount_remaining": 3900,
"created": 1796083200,
"period_start": 1794657600,
"period_end": 1797249600,
"next_payment_attempt": 1797253200,
"customer": "cus_PqR7sT8uV9wX0y",
"customer_email": "[email protected]",
"subscription": "sub_1QhT7sK2mN4pX8vZ",
"hosted_invoice_url": null,
"invoice_pdf": null,
"lines": {
"object": "list",
"has_more": false,
"data": [
{
"id": "il_tmp_1QkR4tK2mN4pX8vZc9D0e1F2",
"object": "line_item",
"description": "1 × Team (at $39.00 / month)",
"amount": 3900,
"currency": "usd",
"quantity": 1,
"period": {
"start": 1797249600,
"end": 1799928000
}
}
]
}
}
}