feat: integrate Stripe payment with subscription plans

Add Stripe payment integration across the project:

- Add @stripe/stripe-js dependency
- Configure Stripe environment variables (secret key, publishable key, webhook secret) for dev, local, and production environments
- Add Product/Price IDs for monthly, quarterly, and annual subscription tiers
- Extend subscription plan data with voiceMinutesPerDay quotas (30/45/60 minutes per tier)
- Update .gitignore to exclude implementation_plan.md
This commit is contained in:
2026-06-16 10:21:02 +08:00
parent 17741320ff
commit 0548a08cbb
25 changed files with 1220 additions and 26 deletions
+8
View File
@@ -24,6 +24,14 @@ export class User {
declare readonly avatarUrl: string;
declare readonly loginProvider: string;
declare readonly isGuest: boolean;
/** 是否为 VIP 会员(Stripe webhook 更新) */
declare readonly isVip: boolean;
/** 语音聊天剩余分钟数(Stripe webhook 更新) */
declare readonly voiceMinutesRemaining: number;
/** Stripe Customer ID —— 首次 Checkout 完成后由 webhook 设置 */
declare readonly stripeCustomerId: string | null;
private constructor(input: UserInput) {
const data = UserSchema.parse(input);