#Gyan - ACH Direct Debit

1 messages · Page 1 of 1 (latest)

hollow zealot
#

Hi there. One moment

#

The Payment Element will take care of that for you actually

uneven acorn
#

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.

hollow zealot
uneven acorn
#

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:

hollow zealot
#

You have to do every step

#

All the ones that aren't marked optional

uneven acorn
hollow zealot
#

PaymentElement would have been loaded by that point

#

That's the js code you need

uneven acorn
#

yes, but on what action will this code run?

hollow zealot
#

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

uneven acorn
hollow zealot
#

That guide actually shows you how to accept a payment with ach direct debit without using the payment element

uneven acorn
#

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

hollow zealot
#

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

uneven acorn
#

yes i just need a method to accept ach direct debit.

hollow zealot
#

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

uneven acorn
#

okay, so you are saying no need of any Stripe elements there, just calling those APIs with right parameters will take care of everything?

hollow zealot
#

Correct

uneven acorn
#

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?

hollow zealot
#

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

uneven acorn
#

yeah.. is that part complicated? because i am new to building webhooks.

hollow zealot
#

You select your language and it provides the snippet for you

#

You just have to fill in details for your integration