#Gyan-ACH
1 messages · Page 1 of 1 (latest)
Hi there, are you following this integration guide? https://stripe.com/docs/payments/ach-debit/accept-a-payment?platform=web&ui=API
Yes i am following this, I couldn't understand this part clearly. Can you help me with this?
I have the client secret and payment method created for the transaction.
Exactly which params you need help with?
I didn't understand how this can help to open the instant verification dialog, as i have the Elements and the PaymentElement component which takes care of the account selection and the verification i guess.
At UI, I am seeing this form coming from Elements form component
Are you using a PaymentElement?
Yes
I see. In this case you should just call stripe.confirmPayment instead.
Please follow this integration guide for ACH payment with PaymentElement https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#ach-debit
oh.. but then where can i attach payment-method ID that i created to supply the bank account details? so that it validate and link that bank account?
You don't need to, PaymentElement will create a PaymentMethod and attach its ID to the PaymentIntent under the hood.
okay, then with this form, i did not see any place where the customer will enter their bank account details before the validation. It looks like it lists the bank that are already associated with the customer object attached to the paymentIntent.
How will someone enter their bank account details to link their account from scratch?
These are just some common test accounts that Stripe present in test mode, they are accessible to all customers.
In live mode your customer will be able to select their own bank and input bank details.
in test account, there is no option of selecting a bank and put in test bank account numbers ?
There's an option to Enter bank details manually in the bottom of PaymentElement
okay
So, when i choose a bank account and finish linking it, it shows like this
and in the background https://api.stripe.com/v1/link_account_sessions/complete is called.
so, after this i just need to call stripe.confirmPayment() after this?
Yes
okay.. also, what about the returning users, who already have a verified and linked paymentMethod? How can i store the data to be used in the next call without re-verifying?
Remember to add a setup_future_usage param when creating a PaymentIntent, so that the collected payment method can be reused.
You can either save the payment method ID in your own DB, or call API to retrieve the list of attached PaymentMethods from the customer (https://stripe.com/docs/api/payment_methods/customer_list?lang=python#list_customer_payment_methods).
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Once you have the customer ID and paymentMethod ID, you can create an off-session charge to the customer (https://stripe.com/docs/payments/save-and-reuse?platform=web#charge-saved-payment-method)
By "call API to retrieve the list of attached PaymentMethods from the customer" you mean the paymentMethod that will be created under the hood by PaymentElement will automatically get attached to the CustomerObject and saved for later use. And later i can use the same customer ID and paymentMethod ID to create a new charge?
just making sure i understood clearly
Yes you are right, provided you pass the setup_future_usage param in PaymentIntent creation
got it!
and given that a customer can have multiple bank accounts, can customerObject contain multiple PaymentMethods ? If yes, how to confirm which ones are already verified and ready to create a charge for the returning customers?
Stripe will perform validation when collecting the payment method through PaymentElement, in another word, the payment methods is validated if the payment is succeeded.
However, there are many reasons (i.e.,, not enough balance, bank account closure) that make a payment fails even with a validated payment method, your application should handle this and advise the customer to provide another payment method.
Yes, i understand this, But am talking about the scenario where a customer has already more than one verified bank accounts, can all of them linked to the same Customer object or the latest one will overwrite the old ones?
You can have many payment methods attached to one customer
Right, can i get a documentation link to retrieve those paymentMethods from the customer Object and also know how to make sure that the paymentMethod i am going to use for the returning customer is always pre-verified?
I've already sent you the doc https://stripe.com/docs/api/payment_methods/customer_list?lang=python#list_customer_payment_methods).
what do you mean by pre-verified?
by pre-verified i mean that the PaymentMethod contains verified bank account (verified at the first time via this flow), so that i don't end up using an un-verified bank account the second time.
When you create a PaymentIntent, you should set the verification_method (https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method_options-us_bank_account-verification_method) to either automatic or instant if you are using PaymentElement. This will trigger the verification process when your customer add a ACH payment method through PaymentElement. If the verification fails, no PaymentMethod is created and the PaymentIntent will not succeed.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.