12 lines
270 B
TypeScript
12 lines
270 B
TypeScript
|
|
import { stripe } from '@documenso/lib/server-only/stripe';
|
||
|
|
|
||
|
|
export type GetInvoicesOptions = {
|
||
|
|
customerId: string;
|
||
|
|
};
|
||
|
|
|
||
|
|
export const getInvoices = async ({ customerId }: GetInvoicesOptions) => {
|
||
|
|
return await stripe.invoices.list({
|
||
|
|
customer: customerId,
|
||
|
|
});
|
||
|
|
};
|