chatgpt后端针对checkout_ui_mode只会返回custom,不管你请求参数里面的checkout_ui_mode了!虽然这只是一个账户的测试(也许是AB测试),但也反映了OpenAI很可能根据最近的举报已经采取行动!
附图


脚本(没有加入优惠参数):
(async function checkoutLinkOnly() {
try {
const session = await fetch('/api/auth/session').then((r) => r.json());
const accessToken = session?.accessToken;
if (!accessToken) {
console.log('accessToken: null');
return;
}
const payload = {
plan_name: 'chatgptplusplan',
billing_details: {
country: 'ID',
currency: 'IDR',
},
cancel_url: 'https://chatgpt.com/#pricing',
checkout_ui_mode: 'hosted',
};
const response = await fetch('https://chatgpt.com/backend-api/payments/checkout', {
method: 'POST',
headers: {
Authorization: `Bearer ${accessToken}`,
'Content-Type': 'application/json',
},
body: JSON.stringify(payload),
});
const data = await response.json();
const hostedUrl = data?.url || data?.stripe_hosted_url || data?.checkout_url || null;
console.log('accessToken:', accessToken);
console.log('paymentLink:', hostedUrl);
} catch (e) {
console.log('accessToken: null');
console.log('paymentLink: null');
}
})();
8 个帖子 - 6 位参与者