Stripe的客户余额交易API是否在所有版本中可用?

时间:2019-08-01 12:13:58

标签: stripe-payments

我将服务器安装在nodejs中,并使用Stripe API v.4.23。我想列出给定客户的余额交易,因此按照stripe.com网站上有关Customer Balance Transactions API的说明,我的代码如下:

return stripe.customers.listBalanceTransactions (
        customerId,
        { limit: 3 },
        function (err, customerBalanceTransactions) {
            if (err) {
                res.json({
                    success: false,
                    msg: err.message
                })
            } else {
                res.json({
                    success: true,
                    data: customerBalanceTransactions.data
                })
            }
        }
    );

但是我收到以下错误: “ TypeError:stripe.customers.listBalanceTransactions不是函数”

我在哪里错了?客户余额交易API是否不是条纹版本4.23的一部分?我还有其他功能,这些功能不希望升级到最新版本,因此,如果原因是版本,则包含该api的主要功能是什么?如果不是这个原因,该如何解决我的代码?

0 个答案:

没有答案