#frallain_api

1 messages ยท Page 1 of 1 (latest)

velvet forumBOT
#

๐Ÿ‘‹ 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/1316700309648703509

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

dull panther
#

I then tried to attach the PM to the customer beforehand with
stripe.PaymentMethod.attach(pm_id, cus_id) and it gave me
Request req_1yZno6CraqEx PaymentMethods of type us_bank_account must be verified before they can be attached to a customer.

#

So I'd like clarification of what needs to be done manually vs what's done by Stripe Element

#

please ๐Ÿ™

ancient needle
#

hi! well if you use Elements, by which I mean for example running a SetupIntent or PaymentIntent with the PaymentElement and calling confirmSetup or confirmPayment
https://docs.stripe.com/payments/ach-direct-debit/set-up-payment?platform=web&payment-ui=direct-api
or
https://docs.stripe.com/payments/ach-direct-debit/accept-a-payment?web-or-mobile=web&payments-ui-type=direct-api

It will verify the account and attach it to the customer(if using a PaymentIntent make sure you pass setup_future_usage when creating it) and then you'd be able to set it as a default.

dull panther
#

so this call should be done on the FE side?

ancient needle
#

looking at you example I don't think you finished the SetupIntent?

dull panther
#

yes indeed, but who should finish it? BE or FE?

ancient needle
#

like you called confirmSetup but then didn't go through the UI for verifying the account

dull panther
#

OK, what I did is :

  • use a Stripe dev env,
  • in the Stripe Element UI, choose ACH debit as payment method and choose to manually input a bank account (by clicking on "Enter bank details manually"
    and use the Stripe test bank account
    Reproducing now to see what's the satus of the setup intent
ancient needle
#

well if you're using "Enter bank details manually" then for instance that is microdeposits and there are extra steps to complete before the SetupIntent succeeds

dull panther
#

When the bank details get filled in with the Stripe test bank account , Stripe Element shows:

dull panther
#

You mean I have to call stripe.collectBankAccountForSetup in the FE ?

ancient needle
#

no, not if you're using the PaymentElement, you can ignore those parts specifically.

dull panther
#

OK, that's the thing, it's unclear (at least to me ๐Ÿ˜… ) what should be done then

ancient needle
#

verify the microdeposits

dull panther
#

in the BE ?

ancient needle
#

no

dull panther
#

via the email sent?

ancient needle
#

yes

dull panther
#

OK I see, will try that

#

Another question: Is it possible to only show the "Enter bank details manually" way of adding ACH debit ?

ancient needle
#

(though I'm curious why you'd want that given the much easier customer UX of Financial Connections)

dull panther
#

Because, from what we understood, the automatic way is a way for Stripe to use the Link payment methods already registered

#

(and I guess we need clarification here)

ancient needle
dull panther
#

that's because we are not used to the ACH process overall (europeans here)

dull panther
#

OK but then they still need to input their bank details somehow no??

ancient needle
#

they log into their bank through the UI, see the screenshot in the most recent link for an example

dull panther
#

OK OK, could you give me a screenshot of what it gives in prod instead of

#

please ๐Ÿ™

ancient needle
dull panther
#

OK. But on https://docs.stripe.com/financial-connections I see that

Financial Connections enables your users to connect their accounts in fewer steps with Link, allowing them to save and quickly reuse their bank account details across Stripe businesses.

#

so by using Financial connection, the payment method will be of type Link no?

ancient needle
#

no, not necessairly

#

in your examples and integration you're using the us_bank_account PaymentMethod type, so that's what you get. That method uses our FC product for the verification(unless you use microdeposits instead).
Link when you present that as a possible PaymentMethod type, has a mode where it can let people pay with their bank, instead of just their card. That also internally uses our FC product. You'd get type:"link" PaymentMethod in those cases.
You can also use FC standalone for other use cases.
Not all this is 100% relevant to you.

dull panther
#

OK understood.

That method uses our FC product for the verification(unless you use microdeposits instead).
so the verification is either done by FC or by microdeposit

ancient needle
#

yes exactly

dull panther
#

Which one takes precedence?

#

Are the ones set in the UI some default ones always applied?

ancient needle
#

what you pass in the API call takes preference

dull panther
#

OK. Other question: I'd say the more information sources the better to verify an account, so in which case a Stripe customer would not tick all the information sources for FC? (balances + Account ownership details + transactions)

velvet forumBOT
ancient needle
#

principle of least access really, if you don't need all the information just to process the payment you don't need it all, and it can put off the customer from wanting to pay

#

for example the permission to view recent transactions on the customer's account makes sense if you're using FC for some use case like deciding to give credit to a customer, but if you're just a merchant charging them for a T-shirt you probably don't care about that or need to know, you just care (at most) do they have enough funds in their account.

jaunty fjord
#

๐Ÿ‘‹ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!

dull panther
#

Surely there will be, thank you very much @ancient needle for your patience! Very appreciated

#

OK I've got a question : it seems I cannot get the "verify microdeposit" email sent when going in the "Enter bank details manually" flow in dev mode

jaunty fjord
#

we don't send most emails in test mode

dull panther
#

ah OK I forgot the +test_email part

jaunty fjord
#

no for ACH you won't receive it no matter what the email is

#

this is why we provide the test values that I shared with you

dull panther
#

OK. But then, where can I input the test MICRODEPOSIT VALUES?

jaunty fjord
#

you're right

#

After you collect the bank account details and accept a mandate, send the mandate confirmation and microdeposit verification emails in test mode. To do this, provide an email in the payment_method_data.billing_details[email] field in the form of {any-prefix}+test_email@{any_domain} when you collect the payment method details.

Common mistake
You need to activate your Stripe account before you can trigger these emails in Test mode.

dull panther
jaunty fjord
#

and did you add the +test_email?

dull panther
#
            return stripe
                .confirmSetup({
                    elements,
                    redirect: 'if_required',
                    confirmParams: {
                        payment_method_data: {
                            // This data is overridden by the stripe elements data, see it as default values.
                            // It's used for the scenario where we don't require the user to re-enter the billing details.
                            billing_details: defaultBillingDetails,
                        },
                    },
                })
    const defaultBillingDetails = {
        ...billingContact?.shipping,
        email: billingContact?.email,
    }
jaunty fjord
#

would you mind sharing the SetupIntent?

#

Id

dull panther
#

I've got the PM id : pm_1QUtPUI9qXomtXqShXw9RLyE

jaunty fjord
#

thanks I'll take a look

#

this is the email you sent hello@acme.gorgias.io

#

which explains why you didn't receive the email

dull panther
#

OK...

jaunty fjord
#

email: billingContact?.email
I think this is overriding the value you're passing

dull panther
#

How did you get the email used in the SI from the PM id I gave you?

jaunty fjord
#

I looked at the setup confirmation request

dull panther
#

OK got it working

jaunty fjord
#

I'm glad to hear that

#

let me know if you need any more help