1.0 KiB
GET https://proapi.banlv-ai.com/api/payment/plans 结果: status=200 success=true plans 数量 8 VIP 套餐 3 个 credits 套餐 5 个 snake_keys=[],已经没有 plan_id / amount_cents 这种字段 schema 校验通过:proapi_plans_camel_schema_ok true 前端按这个结构用: type PaymentPlan = { planId: string; planName: string; orderType: 'vip_monthly' | 'vip_quarterly' | 'vip_annual' | 'dol'; vipDays: number | null; dolAmount: number | null; creditBalance: number; amountCents: number; originalAmountCents: number | null; dailyPriceCents: number | null; currency: string; }; 分组: const plans = res.data.plans;
const vipPlans = plans.filter(p => p.vipDays !== null); const creditPlans = plans.filter(p => p.dolAmount !== null); 下单仍然传 planId: { "planId": "vip_monthly", "payChannel": "stripe", "autoRenew": true } 价格、币种全部以前端拿到的 amountCents / currency 展示,不要写死。当前我这边访问 pro 返回的是 JPY,这是 Cloudflare 根据访问 IP 判的国家币种。