简体   繁体   English

如何使用节点js(服务器端)在移动应用程序中实现支付机制?

[英]How to implement payment mechanism in mobile app using node js (server side)?

I am building rest api for a mobile application.我正在为移动应用程序构建 rest api。 Now, I need to implement payment mechanism similar to upwork payment where when the hirer post job, he or she makes payment and that is in hold.现在,我需要实施类似于 upwork 付款的付款机制,当雇主发布工作时,他或她付款并被搁置。 So, when the worker completes and hirer verifies it, only the payment is released to the worker.因此,当工人完成并且租用人验证它时,只有付款才会发放给工人。

I too went detail on stripe payment but found that it is for directly making payments to the party or verifying valid card.我也详细介绍了条带付款,但发现它是为了直接向当事人付款或验证有效卡。 If stripe also supports above mechanism how can I implement?如果stripe也支持上述机制,我该如何实现?

The hirer should be able to make payment through Apple pay, Amex, VISA, Discover, MasterCard.租车人应该能够通过 Apple pay、Amex、VISA、Discover、MasterCard 付款。 Similarly, the worker should be able to receive payments once released.同样,工人应该能够在被释放后收到付款。

How can i implement it?我该如何实施?

You Need to implement Stripe Custom Connect in order to implement your requirement of holding payment and releasing on later stages.您需要实施Stripe Custom Connect以实现您在后期阶段保持付款和发布的要求。 More Details on - https://stripe.com/docs/connect/custom-accounts更多详情 - https://stripe.com/docs/connect/custom-accounts

Its clear Connect is required - There are three types - Standard, Express, Custom需要明确的 Connect - 共有三种类型 - Standard、Express、Custom

  • Standard - Direct transfer of payment.标准- 直接转账。 Not Customisable不可定制
  • Express - Somewhat customisable.快递- 有点可定制。 Both the sender and receiver of money will have their own stripe dashboard and can take actions from there.汇款人和收款人都有自己的条纹仪表板,可以从那里采取行动。
  • Custom - No stripe dashboard for sender or receiver.自定义- 发送者或接收者没有条纹仪表板。 Have to be fully dependent on Backend Api calls.必须完全依赖后端 Api 调用。 Only Stripe Admin account will be there.只有 Stripe Admin 帐户会在那里。

Key thing to note on Custom Payments - When payment is done to a custom connect account, the money is transferred to receiver stripe account which you creates.关于自定义付款的关键注意事项 -向自定义连接帐户付款后,款项将转入您创建的接收方条带帐户。 Receiver do not have access to this stripe account.接收方无权访问此条带帐户。 When your condition meets and need to transfer the payment, you need to use Payout Api to transfer the money from receiver stripe account to receiver Bank account.当您的条件满足需要转账时,您需要使用Payout Api将钱从收款方条纹账户转账到收款方银行账户。 And Stripe has a timer going on if money is not PaidOut withing the specific timer, money will get refunded to the sender并且 Stripe 有一个计时器,如果在特定的计时器内未支付款项,款项将退还给发件人

Flow would be -流程将是 -

  • There will be two types of users on Stripe 1) Customers (Sender) Stripe have api to create them. Stripe 上将有两种类型的用户 1)客户(发件人) Stripe 有 api 来创建它们。 Creating customer is easy no further steps are required.创建客户很容易,不需要进一步的步骤。 2) Custom Account Holders (Receiver) Stripe have api to create them. 2)自定义帐户持有人(接收者) Stripe 有 api 来创建它们。 Once the Receiver account is created Stripe needs some more info in order to verify the receiver and its necessary you provide them the details within some specific days otherwise this receiver will be blocked and not able to receive payments.创建收款人帐户后,Stripe 需要更多信息来验证收款人,并且有必要在特定日期内向他们提供详细信息,否则此收款人将被阻止且无法接收付款。 This info is dependent country wise.此信息取决于国家/地区。 Above Stripe link has more info regarding this.上面的 Stripe 链接有更多关于此的信息。

  • Receiver must also add their bank accounts details in order to receive the payment.收款人还必须添加他们的银行帐户详细信息才能收到付款。 What data is needed for Bank Account is once again dependent on country of reciver.银行账户需要哪些数据再次取决于收款人所在的国家/地区。 More details on stripe link.有关条纹链接的更多详细信息。

  • Payment is made.付款已完成。 Only few keys are needed to be added like the Receiver Custom Id in order to tell the stripe that its an custom payment.只需要添加几个键,例如接收者自定义 ID,即可告诉条带它是自定义付款。

  • Currently payment is in receiver stripe account once your condition is made you need to use Payout api of Stripe to transfer it to receiver bank Account.目前,一旦您的条件成立,您需要使用 Stripe 的 Payout api 将其转移到接收银行帐户中,付款在接收方条带帐户中。

  • Webhooks will play a very important roles you need to implement any webhook you think may happen in your case on top of my head like - Issue Raised by Sender or Receiver, Receiver account blocked, Payout done or failed. Webhooks 将扮演非常重要的角色,您需要在我的头顶上实施您认为可能发生在您的案例中的任何 webhook,例如 - 发件人或收件人提出的问题、收件人帐户被阻止、付款完成或失败。

Let me know if you need info in any of these steps.如果您需要这些步骤中的任何信息,请告诉我。

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

相关问题 如何使用Express为Android应用程序在node.js中实现服务器端会话? - How to implement server side sessions in node.js with express for an android app? 使用Trello作为网站和移动应用程序的数据源。如何在服务器端实现trello,因为在客户端使用apiKey和Token效果不好 - Use Trello as data Source for website and mobile App.How to Implement trello in server side because using apiKey and Token to client side in not good 移动应用程序的Node js服务器端会话 - Node js server side sessions for mobile applications 如何实现服务器端呈现数据表,使用node和mongo db? - How to implement server side rendering datatable, Using node and mongo db? 如何在Sequelize ORM中实现缓存机制npm - node.js - How to implement caching mechanism in Sequelize ORM npm — node.js 如果我在后端使用节点 js 服务器,如何将 ionic-react 应用程序部署到移动设备? - how to deploy an ionic-react app to mobile if I'm using node js server in the backend? 如何在Ionic移动应用程序中运行Node.js服务器? - How to run Node.js server in Ionic mobile app? 在Node JS中实现服务器端缓存的最佳方法 - Best way to implement server side cache in Node JS 如何为Firebase实现Node.Js服务器端事件侦听器? - How do I Implement a Node.Js server-side event listener for Firebase? 使用Node.js的服务器端代理 - Server Side Proxy using Node.js
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM