按F12或者点击检查进入控制台最下方粘贴代码按回车键:
const AutoOpen = false; console.log('正在生成 Business Codex 按使用量计费 pay.openai.com 链接...'); 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: 'chatgptbusiness_usage_based', entry_point: 'team_workspace_purchase_modal', checkout_ui_mode: 'hosted', billing_details: { country: 'US', currency: 'USD', }, usage_based_workspace_credit_purchase_data: { workspace_name: 'work', quantity: 13, unit: 'credit', }, cancel_url: 'https://chatgpt.com/#pricing', }), }); const data = await res.json(); if (!res.ok) throw new Error(JSON.stringify(data)); if (!data.url) throw new Error('接口没有返回 pay.openai.com 链接'); console.log('%c 成功生成 pay.openai.com 支付链接:', 'color:#10a37f;font-size:18px;font-weight:bold;'); console.log(data.url); if (AutoOpen) window.open(data.url, '_blank');} catch (e) { console.error(' 执行出错:', e);}
点击链接打开:
![]()
7
22
22 条回复
排序