Basic Questions for Django ACH with Stripe

丶灬走出姿态 提交于 2019-12-23 05:23:02

问题


I'm wanting to set up ACH payments in my django app. I see that stripe does it, however, I'm not sure how to implement it. According to the documentation you can use stripe.js to collect the customer's bank account. I need help with the flow. Do I first use html page to collect the bank info, use stripe.js to add that to Stripe and acquire a token which I then attach it to a Customer?

Does anyone know of any django stripe ach guides? I've been looking around and it seems so new that there isn't really anything out there.


回答1:


So the flow would work like this:

  1. Collect the user's bank details. You can accomplish this in one of two ways(note that in no case should you collect it using your own HTML, to avoid PCI compliance issues):
    • Use Plaid[0]. In this case, Plaid Link creates frontend elements on your site which collects the details. You get back Plaid tokens in the onSuccess callback.
    • Or, collect them yourself using Stripe Elements. You can see an example of this here[1]. You get a Stripe bank account token after calling createToken. [2]
  2. You need to verify the details that you collected:
    • If you used Plaid, you need to pass the tokens to your backend code and call the Plaid API, which will give you a verified Stripe bank account token.[3] Calling that API is described in [0].
    • Or, if you collected the details yourself, you need to do the manual verification process. [4] You call the Stripe API to attach the bank account token to your customer. Stripe will make two small deposits to the bank account. Your customer needs to tell you the amounts of those deposits, which you then submit back to the Stripe API, which verifies the bank account.
  3. You now have a Stripe Customer object with a bank account attached as a source, and you can make charges against it[5] or subscribe it to a plan, as normal.[6]

[0] - https://stripe.com/docs/ach#using-plaid

[1] - https://jsfiddle.net/ywain/8nobq41n/

[2] - https://stripe.com/docs/stripe-js/reference#collecting-bank-account-details

[3] - https://stripe.com/docs/api#token_object-type

[4] - https://stripe.com/docs/ach#manually-collecting-and-verifying-bank-accounts

[5] - https://stripe.com/docs/api#create_charge

[6] - https://stripe.com/docs/api#create_subscription



来源:https://stackoverflow.com/questions/50469058/basic-questions-for-django-ach-with-stripe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!