#fredrick245_api

1 messages ยท Page 1 of 1 (latest)

clear elmBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1485976558027145307

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

trim osprey
#

๐Ÿ‘‹ happy to help

#

are you using Checkout Sessions? or integrating with Elements?

mild gazelle
#

Intergreting with stripejs elements

trim osprey
#

ok, would you mind sharing the confirmPayment code?

#

@mild gazelle are you still here?

mild gazelle
#

yes

trim osprey
#

do you have your website running on an accessible server where I could test?

mild gazelle
#

yes

#

can create an account using a dummy email

#

or lemme create the account for you

trim osprey
#

yes please do

mild gazelle
#

Password:Textchat@123

trim osprey
#

you can delete them now if you like

trim osprey
#

Invalid client account id

#

and the billing page is not loading

#

actually no page is loading ๐Ÿ™

mild gazelle
#

Can you try upgrading the plan, and then select ach on the last step

#

That is where I have a problem

mild gazelle
#

there is a barner up there

#

for you to upgrade to a plan

trim osprey
mild gazelle
#

can you to the /dashboard

trim osprey
#

okay works better now

#

ok, I'm there now

mild gazelle
#

I have started using stripe on this project, and I noticed that you guys dont have very good docs
Or beginer friendly docs
Is there maybe a github repo with an example with an example on how to intergrate ach and also some of the webhooks

trim osprey
#

we'll get to that in a minute

mild gazelle
#

So the first options work, but when you use the Bank Oath , and you are redirected to login into you bank

trim osprey
#

can we just keep on track with the ACH issue for now, just bear with me

mild gazelle
#

Oka

#

Okay

mild gazelle
#

It just says Something went wrong with a 400 error

trim osprey
#

yes, I'm taking a look

clear elmBOT
trim osprey
#

I'm working with my colleague @uneven spoke that will take over the chat to figure out what's happening here

mild gazelle
#

Ok

trim osprey
#

we'll get back to you shortly

uneven spoke
#

hey there, have been poking at this with tarzan and looking at the code you shared

#

1/ Are you hitting the error block after elements.submit() here?

const { error: submitError } = await elements.submit();
        if (submitError) {
          onError(submitError.message ?? 'Please complete the form');
          setSubmitting(false);
          return;
        }
mild gazelle
#

The issue is am not being redirected back, after logging into the bank

uneven spoke
#

2/ I noticed some potentially problematic patterns in your initialization, where you pass the clientSecret both to <Elements> options and in confirmSetup

<Elements
      key={clientSecret}
      stripe={stripePromise}
      options={{ clientSecret, appearance: ACH_ELEMENTS_APPEARANCE }}
    >
const result = (await stripe.confirmSetup({
          elements,
          clientSecret,
          confirmParams: {
            return_url:
              typeof window !== 'undefined'
                ? `${window.location.origin}/organization/billing`
                : 'https://example.com',
            payment_method_data: {
              billing_details: billingDetails
            }
          }
        }))
mild gazelle
#

So am not getting the bank details like the last 4 digits and routing number that I can use then to submit the form

uneven spoke
#

Additionally, this confirmSetup call with both of elements and clientSecret is not expected and may be invalid

#

Is this ever working for any bank choice, or never worked?

mild gazelle
#

yes

uneven spoke
#

I suspect this elements configuration might be failing in unexpected ways due to the pattern

uneven spoke
mild gazelle
#

ok
Lemme look at this from that point and then I will reach out it does'nt work

mild gazelle
#

Do you guys have a repo or an example repo where this has been worked out so that I can draw insipiration from there

uneven spoke
#

Your app logic seems to wait for 1clientSecret` to be set before rendering elements, so you have that with a value up front

#

i would suggest removing this from the confirm call

#

But it would also be helpful to know where in your client code this gets to / where is it failing

#

Ah, and with the client secret up front, the elements.submit() call isnt needed at all

#

so you cna try removing that and just going directly to confirmSetup