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

Function requireStripeClient

apps/sim/lib/billing/stripe-client.ts:77–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

75 * Use this when Stripe operations are required
76 */
77export function requireStripeClient(): Stripe {
78 const client = getStripeClient()
79
80 if (!client) {
81 throw new Error(
82 'Stripe client is not available. Set STRIPE_SECRET_KEY in your environment variables.'
83 )
84 }
85
86 return client
87}

Callers 14

purchaseCreditsFunction · 0.90
getCustomerIdFromDisputeFunction · 0.90
createBillingPortalUrlFunction · 0.90
getPaymentMethodDetailsFunction · 0.90
handleInvoiceFinalizedFunction · 0.90
route.tsFile · 0.90
route.tsFile · 0.90

Calls 1

getStripeClientFunction · 0.85

Tested by

no test coverage detected