mirror of
https://github.com/documenso/documenso.git
synced 2025-11-15 01:01:49 +10:00
12 lines
319 B
TypeScript
12 lines
319 B
TypeScript
import { stripe } from '@documenso/lib/server-only/stripe';
|
|
|
|
export const getStripeCustomerById = async (stripeCustomerId: string) => {
|
|
try {
|
|
const stripeCustomer = await stripe.customers.retrieve(stripeCustomerId);
|
|
|
|
return !stripeCustomer.deleted ? stripeCustomer : null;
|
|
} catch {
|
|
return null;
|
|
}
|
|
};
|