mirror of
https://github.com/marcogll/TaxHacker_s23.git
synced 2026-01-13 21:35:19 +00:00
14 lines
376 B
TypeScript
14 lines
376 B
TypeScript
import Stripe from "stripe"
|
|
import config from "./config"
|
|
|
|
export const stripeClient: Stripe | null = config.stripe.secretKey
|
|
? new Stripe(config.stripe.secretKey, {
|
|
apiVersion: "2025-03-31.basil",
|
|
})
|
|
: null
|
|
|
|
// Type guard to check if Stripe is initialized
|
|
export const isStripeEnabled = (client: Stripe | null): client is Stripe => {
|
|
return client !== null
|
|
}
|