尝试使用 Node.js 获取付款时出现条带付款错误

问题描述 投票:0回答:0

当我尝试使用 Node.js 将 Stripe 支付到我的本地银行帐户时,它会显示

"Payout error: StripeInvalidRequestError: No such external account: '83135907'" error 

我使用下面的代码来获得付款

    try {
      const bankDetails = await getBankDetails(recipientUserId);
      console.log(bankDetails)
  
      if (!bankDetails) {
        throw new Error("Bank details not found for the recipient user");
      }
  
      const payout = await stripe.payouts.create({
        amount: amount,
        currency: "usd",
        method: "instant",
        destination: bankDetails.Account_No,
      });
  
      console.log("Payout successful:", payout);
      return payout;
    } catch (error) {
      console.error("Payout error:", error);
      throw error;
    }
  }

当我尝试执行此控制台日志时

付款错误:StripeInvalidRequestError:没有此类外部帐户:'83135997'
在 StripeError.generate (C:\Users\Asus\Desktop\Fastmove\FastMove-Backend ode_modules\strip

node.js axios stripe-payments
© www.soinside.com 2019 - 2024. All rights reserved.