mirror of
https://github.com/documenso/documenso.git
synced 2025-11-18 02:32:00 +10:00
11 lines
280 B
TypeScript
11 lines
280 B
TypeScript
import { stripe } from '@documenso/lib/server-only/stripe';
|
|
import type { User } from '@documenso/prisma/client';
|
|
|
|
export const deleteStripeCustomer = async (user: User) => {
|
|
if (!user.customerId) {
|
|
return null;
|
|
}
|
|
|
|
return await stripe.customers.del(user.customerId);
|
|
};
|