Updated dependencies, Added Hosted mode for Stripe checkout

* chore: bump version to 3.1.0 and update dependencies in package.json, pnpm-lock.yaml, and pnpm-workspace.yaml; enhance billing services with support for hosted checkout page in Stripe integration

* Enhance error handling in billing services to log error messages instead of objects; update documentation for Stripe integration to clarify publishable key requirements based on UI mode.
This commit is contained in:
Giancarlo Buomprisco
2026-03-31 12:44:30 +08:00
committed by GitHub
parent 9d7c7f8030
commit 6268d1bab0
15 changed files with 1018 additions and 566 deletions

View File

@@ -1,11 +1,19 @@
import * as z from 'zod';
const isHostedMode = process.env.STRIPE_UI_MODE === 'hosted_page';
export const StripeClientEnvSchema = z
.object({
publishableKey: z.string().min(1),
publishableKey: isHostedMode
? z.string().optional()
: z.string().min(1),
})
.refine(
(schema) => {
if (isHostedMode || !schema.publishableKey) {
return true;
}
return schema.publishableKey.startsWith('pk_');
},
{