MCPcopy Index your code
hub / github.com/OpenPipe/OpenPipe / getPaymentMethods

Function getPaymentMethods

app/src/server/utils/stripe.ts:73–84  ·  view source on GitHub ↗
(stripeCustomerId: string)

Source from the content-addressed store, hash-verified

71 });
72
73export async function getPaymentMethods(stripeCustomerId: string) {
74 const customer = await stripe.customers.retrieve(stripeCustomerId);
75
76 if (customer.deleted) {
77 return undefined;
78 }
79
80 return await stripe.paymentMethods.list({
81 customer: stripeCustomerId,
82 type: "card",
83 });
84}
85
86export function usdToCents(usd: number | Decimal) {
87 const cents = Math.round(Number(usd) * 100);

Callers 2

payments.router.tsFile · 0.90
chargeInvoiceFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected