在node.js中获取升级代码
我想通过stripe node.js API获得促销代码: 抛出一个错误:在node.js中获取升级代码,node.js,stripe-payments,promotion-code,stripe-api,Node.js,Stripe Payments,Promotion Code,Stripe Api,我想通过stripe node.js API获得促销代码: 抛出一个错误: UnhandledPromisejectionWarning:TypeError:无法读取未定义的属性“列表” 其他API端点工作正常 stripe是否有任何附加条件来处理促销代码? 我只找到了这些信息,但它没有回答我的问题:确保您至少在添加对该端点的支持的地方使用了这些信息。@taintedzodiac我已更新,并且工作正常。谢谢你,你救了我一天! const stripe = require('stripe'
UnhandledPromisejectionWarning:TypeError:无法读取未定义的属性“列表”
其他API端点工作正常
stripe是否有任何附加条件来处理促销代码?
我只找到了这些信息,但它没有回答我的问题:确保您至少在添加对该端点的支持的地方使用了这些信息。@taintedzodiac我已更新,并且工作正常。谢谢你,你救了我一天!
const stripe = require('stripe')('...');
const promotionCodes = await stripe.promotionCodes.list({
limit: 3,
});