【问题标题】:Stripe retrieve payment history of a customerStripe 检索客户的付款历史记录
【发布时间】:2020-11-16 20:53:32
【问题描述】:

在我的网络应用程序中,我有 Stripe 客户通过卡向 Stripe 连接的帐户付款。我正在尝试检索客户所做的付款历史记录,以将其显示给客户以构建交易历史记录仪表板。到目前为止,我尝试过:

  const balanceTransactions = await stripe.customers.listBalanceTransactions(
    'cus_xxxxyyy',
    {limit: 3}
  );
  console.log(balanceTransactions);

但是余额交易是空的,如果我查看我的 Stripe 控制台(尽管它处于测试模式),客户确实有付款历史记录:

{
  object: 'list',
  data: [],
  has_more: false,
  url: '/v1/customers/cus_xxxxyyy/balance_transactions'
}

付款不算作余额交易吗?有什么其他方法可以检索客户过去的所有付款历史记录,最好是 Stripe 的托管工具?

【问题讨论】:

    标签: node.js stripe-payments


    【解决方案1】:

    列出客户的余额交易包括影响其 Stripe 余额的交易(例如贷方票据),而不是客户的完整付款/收费历史记录。您可以在此处阅读有关客户信用余额的更多信息:https://stripe.com/docs/billing/customer/balance

    您可以使用 Payment Intent API 检索为特定客户 (https://stripe.com/docs/api/payment_intents/list#list_payment_intents-customer) 支付的付款列表。

    【讨论】:

    猜你喜欢
    • 2021-03-03
    • 2021-03-18
    • 2012-11-04
    • 2011-09-29
    • 2015-03-01
    • 2013-09-14
    • 2019-12-31
    • 2015-09-23
    • 1970-01-01
    相关资源
    最近更新 更多