#Gyan - ACH Direct Debit
1 messages · Page 1 of 1 (latest)
Hi there. One moment
The Payment Element will take care of that for you actually
okay, So, it looks like i need to pass payment_method and other details in the PaymentElement component as it is throwing the below error on submit:
Payment failed A payment method of type us_bank_account was expected to be present, but this PaymentIntent does not have a payment method and none was provided. Try again providing either the payment_method or payment_method_data parameters.
I am using React components.
Yeah you would do that in this step: https://stripe.com/docs/payments/ach-debit/accept-a-payment?platform=web&ui=API#web-collect-details
are you talking about this part?
I thought this step is being taken care by PaymentElement itself.
So, i was directly doing step 5 on Submit:
okay, but when this step will be called? as in do i when do i have to show PaymentElement component then?
yes, but on what action will this code run?
On form submit
And apologies
You will have to build a custom form with the fields described in that js snippet
Or the other option is to just use checkout
Prebuilt checkout page is a bit easier
I already have these fields. this will come before the PaymentElement?
That guide actually shows you how to accept a payment with ach direct debit without using the payment element
Use this guide if you want to use the Payment Element: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
Yes, but i am already mid way in Direct API implementation. Can you guide me on the same?
I wanted to avoid redirections, this way i have more control on the data at component level
What is your question then?
There is no Payment Element in the guide you linked
That guide is provided if the only payment you need to accept is ach direct debit
Otherwise, the Payment Element is superior
yes i just need a method to accept ach direct debit.
Ok then your linked guide is fine. You will need to follow every step not marked optional. Let me know specifically what you need help with
okay, so you are saying no need of any Stripe elements there, just calling those APIs with right parameters will take care of everything?
Correct
You just need the forms/fields reference in this js snippet: https://stripe.com/docs/payments/ach-debit/accept-a-payment?platform=web&ui=API#web-collect-details
Build a custom payment form or use Stripe Checkout to accept payments with ACH Direct Debit.
okay. and 1 question on pre-built checkout, As i have read, once the checkout session is completed and the user is redirected back on the "success_url", do i have to also build the webhook to fulfill the order?
Yeah the webhook piece is highly recommended
Relying just on the return_url being reached isn't robust enough
Browser could crash, client could disconnect, etc
yeah.. is that part complicated? because i am new to building webhooks.
No we have a great guide for this. Pretty easy to get set up: https://stripe.com/docs/webhooks/quickstart
You select your language and it provides the snippet for you
You just have to fill in details for your integration