简体   繁体   English

使用 Stripe 向银行账户汇款 | 节点JS

[英]Send money to a bank account using Stripe | Node JS

So I have this React application where users can buy gift cards online, and I'm using Stripe Payments.所以我有这个 React 应用程序,用户可以在其中在线购买礼品卡,我正在使用 Stripe Payments。 So far, the users can pay the money, except it will go to me(through Stripe), not to the merchant selling the Gift Cards on my app.到目前为止,用户可以支付这笔钱,除了它将 go 给我(通过 Stripe),而不是给在我的应用程序上销售礼品卡的商家。

Is there a way with Stripe to send money to a bank account? Stripe 有没有办法向银行账户汇款? Keep in mind that the bank account will be different for each Gift Card any users can buy.请记住,任何用户可以购买的每张礼品卡的银行账户都会有所不同。 For example, one person selling the gift cards will be the one earning the money through a different bank account than another person.例如,销售礼品卡的人将是通过与另一个人不同的银行账户赚钱的人。

If there is a way, please tell me how to implement it, and thank you very much in advance.如果有办法,请告诉我如何实现它,并在此先感谢您。

I finally figured how to do this.我终于想出了如何做到这一点。 You have to follow these steps:您必须按照以下步骤操作:

1: Integrate Stripe Checkout 1:集成条纹结帐

2: Integrate Stripe Onboarding for express accounts 2:为快递账户集成 Stripe Onboarding

These two steps are the fundamental steps in doing this.这两个步骤是执行此操作的基本步骤。

How To Integrate Stripe Checkout:如何集成条纹结帐:

You can get stripe checkout by using the您可以使用

stripe.checkout.sessions.create

method.方法。 You can then pass in arguments like:然后您可以像这样传递 arguments :

payment_method_types: ["card"],
locale: locale,
line_items: [
  {
    name: `${Name}`,
    images: ["Images"],
    quantity: 1,
    currency: usd,
    amount: price, // Keep the
    // amount on the server to prevent customers
    // from manipulating on client
  },
],
payment_intent_data: {
  transfer_data: {
    destination: product.id,
  },
},
success_url: `success`,
cancel_url: `cancel`,

What this will do is create a new checkout session to use.这将创建一个新的结帐 session 以供使用。

Next Step, Onboard the businesses下一步,加入企业

All you have to do for this is to go to a URL:您所要做的就是将 go 到 URL:

const url = `https://connect.stripe.com/express/oauth/authorize?${args.toString()}

where args is this:其中 args 是:

const state = uuid();

const args = new URLSearchParams({
  state,
  client_id: process.env.STRIPE_CLIENT_ID,
});

Send this data to your frontend and you will get a good looking form that onboard users and creates express accounts for them.将此数据发送到您的前端,您将获得一个漂亮的表单,该表单可以载入用户并为他们创建快速帐户。

The basic concept is simple, you onboard the businesses, which creates a stripe account for them.基本概念很简单,您加入企业,为他们创建一个条带帐户。 Then with the checkout form, you send the money to that created stripe account.然后使用结帐表格,您将钱汇到创建的条带帐户。 This account will automatically deliver to the businesses bank or debit account, thus making customer to merchant payments.该帐户将自动发送到企业银行或借记帐户,从而使客户对商家付款。

Here are some helpful documentation I used to solve the problem:以下是我用来解决问题的一些有用文档:

I hope this helps!我希望这有帮助!

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

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