简体   繁体   English

使用节点 js 中的条带 js 使用银行帐号创建订阅

[英]Creating a subscription using bank account number using stripe js in node js

I have created subscription by accespting credit/debit card number, exp month, exp year and cvc from front end angular app and creating我通过接受来自前端 angular 应用程序的信用卡/借记卡号、exp 月、exp 年和 cvc 并创建订阅来创建订阅

  • Customer顾客
  • Product产品
  • Product Price产品价格
  • Payment Method付款方式
  • Subscription订阅

In payment method i provide following details:在付款方式中,我提供以下详细信息:

    async function createPaymentMethod(data) {
  let body = {
    type: 'card',
    card: {
      number: data.card?.number,
      exp_month: data.card?.exp_month,
      exp_year: data.card?.exp_year,
      cvc: data.card?.cvc
    }
  };
  return await stripe.paymentMethods.create(body);
}

Now i want to create payment method but want to use customer's bank account number but i am unable to find a way to do it.现在我想创建付款方式,但想使用客户的银行帐号,但我找不到方法。 I want to add "type: bank_account"我想添加“类型:bank_account”

Note: I am using Strip JS and Node JS.注意:我使用的是 Strip JS 和 Node JS。 All of this I want to do on server side ie node js所有这些我都想在服务器端做,即节点 js

Collecting Credit Card server-side is a bad idea, since you will expose yourself to the burden on PCI-Compliance.在服务器端收集信用卡是个坏主意,因为您将面临 PCI 合规性的负担。 You would want to review Stripe's Integration Security Guide .您可能需要查看Stripe 的集成安全指南 Generally you would want to use client-side SDK to collect credit card information instead.通常,您会希望使用客户端 SDK 来收集信用卡信息。

To the question of a bank account, it depends on which specific PaymentMethod you're gonna use (which country's bank transfer?) Ie.对于银行账户的问题,这取决于您将使用哪种特定的 PaymentMethod(哪个国家的银行转账?)即。 If you are talking about ACH in the US, you should follow the ACH Guide .如果您在美国谈论 ACH,您应该遵循ACH 指南 Similarly it will collect bank account information client-side in exchange of a token, then passing it up to your back end.同样,它将在客户端收集银行帐户信息以交换令牌,然后将其传递到您的后端。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM