cURL
curl --request GET \
--url https://api.tirdad.ai/v1/customers/{id}/invoices/summary \
--header 'x-api-key: <api-key>'from tirdad_sdk import Tirdad
with Tirdad(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.invoices.get_customer_invoice_summary(id="<id>")
# Handle response
print(res)import { Tirdad } from "@tirdad/sdk";
const tirdad = new Tirdad({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await tirdad.invoices.getCustomerInvoiceSummary("<id>");
console.log(result);
}
run();package main
import(
"context"
tirdad "github.com/tirdad-billing/go-sdk/v2"
"log"
)
func main() {
ctx := context.Background()
s := tirdad.New(
tirdad.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Invoices.GetCustomerInvoiceSummary(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.CustomerMultiCurrencyInvoiceSummary != nil {
// handle response
}
}{
"customer_id": "<string>",
"default_currency": "<string>",
"summaries": [
{
"currency": "<string>",
"customer_id": "<string>",
"overdue_invoice_count": 123,
"total_invoice_count": 123,
"total_overdue_amount": "<string>",
"total_revenue_amount": "<string>",
"total_unpaid_amount": "<string>",
"unpaid_fixed_charges": "<string>",
"unpaid_invoice_count": 123,
"unpaid_usage_charges": "<string>"
}
]
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}Invoices
Get customer invoice summary
Use when showing a customer’s invoice overview (e.g. billing portal or balance summary). Includes totals and multi-currency breakdown.
GET
/
customers
/
{id}
/
invoices
/
summary
cURL
curl --request GET \
--url https://api.tirdad.ai/v1/customers/{id}/invoices/summary \
--header 'x-api-key: <api-key>'from tirdad_sdk import Tirdad
with Tirdad(
api_key_auth="<YOUR_API_KEY_HERE>",
) as f_client:
res = f_client.invoices.get_customer_invoice_summary(id="<id>")
# Handle response
print(res)import { Tirdad } from "@tirdad/sdk";
const tirdad = new Tirdad({
apiKeyAuth: "<YOUR_API_KEY_HERE>",
});
async function run() {
const result = await tirdad.invoices.getCustomerInvoiceSummary("<id>");
console.log(result);
}
run();package main
import(
"context"
tirdad "github.com/tirdad-billing/go-sdk/v2"
"log"
)
func main() {
ctx := context.Background()
s := tirdad.New(
tirdad.WithSecurity("<YOUR_API_KEY_HERE>"),
)
res, err := s.Invoices.GetCustomerInvoiceSummary(ctx, "<id>")
if err != nil {
log.Fatal(err)
}
if res.CustomerMultiCurrencyInvoiceSummary != nil {
// handle response
}
}{
"customer_id": "<string>",
"default_currency": "<string>",
"summaries": [
{
"currency": "<string>",
"customer_id": "<string>",
"overdue_invoice_count": 123,
"total_invoice_count": 123,
"total_overdue_amount": "<string>",
"total_revenue_amount": "<string>",
"total_unpaid_amount": "<string>",
"unpaid_fixed_charges": "<string>",
"unpaid_invoice_count": 123,
"unpaid_usage_charges": "<string>"
}
]
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}{
"code": "http_client_error",
"http_status_code": 123,
"message": "<string>"
}