fix payments

This commit is contained in:
Emily
2024-06-12 15:43:23 +02:00
parent b7c3ef19ba
commit 6a7143c8d4
8 changed files with 173 additions and 89 deletions

View File

@@ -54,6 +54,12 @@ class StripeService {
return subscription;
}
async getAllSubscriptions(customer_id: string) {
if (!this.stripe) throw Error('Stripe not initialized');
const subscriptions = await this.stripe.subscriptions.list({customer: customer_id});
return subscriptions;
}
async getInvoices(customer_id: string) {
const invoices = await this.stripe?.invoices.list({ customer: customer_id });
return invoices;