feat: [PULSE-32] Invoice history and download — Billing tab invoice list and PDF/view links

This commit is contained in:
Usman Baig
2026-02-03 19:56:15 +01:00
parent eaf02c853f
commit a9517396d7
2 changed files with 107 additions and 3 deletions

View File

@@ -58,3 +58,20 @@ export async function createCheckoutSession(params: CreateCheckoutParams): Promi
body: JSON.stringify(params),
})
}
export interface Invoice {
id: string
amount_paid: number
amount_due: number
currency: string
status: string
created: number
hosted_invoice_url: string
invoice_pdf: string
}
export async function getInvoices(): Promise<Invoice[]> {
return await billingFetch<Invoice[]>('/api/billing/invoices', {
method: 'GET',
})
}