保姆级实操步骤
- 网络环境准备:强烈建议全程使用纯净的 原生住宅 IP(如 711Proxy 等原生家宽环境),这是确保 Stripe 结算网关不触发二次风控的核心。
- 登录官网:在浏览器中打开并正常登录 chatgpt.com。
- 打开控制台并解封:按下
F12进入Console,手动输入allow pasting回车(如已解封可跳过)。 - 运行自动化脚本:将下面的高能脚本完整复制,粘贴到控制台中,直接按下回车运行。
核心自动化支付链接生成脚本
以下是经过美化并补全中文注释的代码,直接整段复制即可:
// ── ChatGPT 支付链接生成脚本 ──────────────────────────────
const LongLinkMode = true; // true=长链接 false=短链接
const Currency = 'USD';
const Country = 'US';
const PlanName = 'chatgptteamplan'; // Team 计划
const AutoOpen = false;
const FreeTrial = 'custom'; // on | off | custom
console.log('⏳ 正在获取凭证并请求生成链接...');
try {
const { accessToken: token } = await (await fetch('/api/auth/session')).json();
if (!token) throw new Error('无法获取 Token,请确保你已登录 ChatGPT');
const res = await fetch('https://chatgpt.com/backend-api/payments/checkout', {
method: 'POST',
headers: {
Authorization: `Bearer ${token}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
plan_name: 'chatgptteamplan',
billing_details: { country: 'US', currency: 'USD' },
checkout_ui_mode: 'hosted',
entry_point: 'team_workspace_purchase_modal',
promo_code: 'THINK26',
team_plan_data: { workspace_name: 'work', price_interval: 'month', seat_quantity: 2 },
cancel_url: 'https://chatgpt.com/?promoCode=THINK26',
}),
});
if (!res.ok) throw new Error(`请求失败: ${res.status} ${res.statusText}`);
const { url, detail } = await res.json();
if (url) {
console.log('%c✅ 成功生成支付长链接:', 'color:#10a37f;font-size:18px;font-weight:bold;');
console.log(url);
console.log(url.replace('pay.openai.com', 'checkout.stripe.com'));
// AutoOpen=false,不自动打开
} else {
console.error('❌ 生成失败'); if (detail) console.error(detail);
}
} catch (e) {
console.error('❌ 执行出错:', e);
}