MCPcopy Index your code
hub / github.com/simstudioai/sim / getCustomerId

Function getCustomerId

apps/sim/lib/billing/stripe-payment-method.ts:22–27  ·  view source on GitHub ↗
(
  customer: string | Stripe.Customer | Stripe.DeletedCustomer | null | undefined
)

Source from the content-addressed store, hash-verified

20 * `customer` field (id string, full `Customer`, or `DeletedCustomer`).
21 */
22export function getCustomerId(
23 customer: string | Stripe.Customer | Stripe.DeletedCustomer | null | undefined
24): string | undefined {
25 if (!customer) return undefined
26 return typeof customer === 'string' ? customer : customer.id
27}
28
29/**
30 * Resolve a subscription's default payment method with fallback to the

Callers 1

purchaseCreditsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected