您必须提供 lineItems、items 或 sessionId 之一,以用于条带计量使用

You must provide one of lineItems, items, or sessionId, for stripe metered usage

我正在尝试实施条带计量使用,但在创建结帐会话时出现抛出错误 You must provide one of lineItems, items, or sessionId

C创建结帐会话的模式

const session = await stripe.checkout.sessions.create({
      mode: 'subscription',
      payment_method_types: ['card'],
      line_items: [
        { price: price_1234..... },
      ],
      success_url: `${domainURL}/myTeam?session_id={CHECKOUT_SESSION_ID}`,
      cancel_url: `${domainURL}/myTeam`,
    });

根据条纹

For metered billing, do not pass quantity

参考文档 - https://stripe.com/docs/billing/subscriptions/checkout#create-session

有人可以告诉我这里做错了什么吗?

在联系 Stripe 之后,这就是我得到的。希望这对所有尝试使用计量结账的人有所帮助。

PS- 发送邮件后,我的帐户在 2 小时内获得批准。