mirror of
https://github.com/marcogll/TaxHacker_s23.git
synced 2026-01-13 21:35:19 +00:00
feat: storage and token limiting
This commit is contained in:
13
lib/stripe.ts
Normal file
13
lib/stripe.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user