#frallain_api
1 messages ยท Page 1 of 1 (latest)
๐ 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.
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 ๐
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.
so this call should be done on the FE side?
looking at you example I don't think you finished the SetupIntent?
yes indeed, but who should finish it? BE or FE?
like you called confirmSetup but then didn't go through the UI for verifying the account
the FE, you call confirmSetup, that presents a UI (https://docs.stripe.com/financial-connections), the customer goes through it, when they're done the SetupIntent is now status:succeeded and you can do stuff with the PM
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
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
When the bank details get filled in with the Stripe test bank account , Stripe Element shows:
yep
so
https://docs.stripe.com/payments/ach-direct-debit/set-up-payment?platform=web&payment-ui=direct-api#send-transaction-emails-in-test-mode
and then
https://docs.stripe.com/payments/ach-direct-debit/set-up-payment?platform=web&payment-ui=direct-api#test-microdeposit-amounts-and-descriptor-codes for the page that gets emailed
You mean I have to call stripe.collectBankAccountForSetup in the FE ?
no, not if you're using the PaymentElement, you can ignore those parts specifically.
OK, that's the thing, it's unclear (at least to me ๐ ) what should be done then
verify the microdeposits
in the BE ?
no
via the email sent?
so
https://docs.stripe.com/payments/ach-direct-debit/set-up-payment?platform=web&payment-ui=direct-api#send-transaction-emails-in-test-mode is how you get us to email you a link to the page for verifying the deposits(pass a specific email address when calling confirmSetup) ; and then you can enter the test values in that page
yes
you can also visit the hosted_verification_url in the SetupIntent response (see https://dashboard.stripe.com/test/logs/req_BeXUMQClztCt4g for example)
OK I see, will try that
Another question: Is it possible to only show the "Enter bank details manually" way of adding ACH debit ?
(though I'm curious why you'd want that given the much easier customer UX of Financial Connections)
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)
no, this is nothing to do with Link specifically. It's our product https://docs.stripe.com/financial-connections that is similiar to how things like Plaid work and connect to the customer's bank account.
that's because we are not used to the ACH process overall (europeans here)
OK but then they still need to input their bank details somehow no??
they log into their bank through the UI, see the screenshot in the most recent link for an example
OK OK, could you give me a screenshot of what it gives in prod instead of
please ๐
there's an extremely good demo at https://docs.stripe.com/financial-connections
beyond that I don't have anything else I could share
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?
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.
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
yes exactly
OK. One question : When setuping FC (see 1st screenshot) I can select different information sources.
But then, when creating the SetupIntent (https://docs.stripe.com/payments/ach-direct-debit/set-up-payment?platform=web&payment-ui=direct-api#web-create-setup-intent) do I need to specify once more the permissions?
payment_method_options={"us_bank_account": {"financial_connections": {"permissions": ["payment_method", "balances"]}, },
Which one takes precedence?
Are the ones set in the UI some default ones always applied?
what you pass in the API call takes preference
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)
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.
๐ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
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
we don't send most emails in test mode
and for test mode you need to use https://docs.stripe.com/payments/ach-direct-debit/set-up-payment?platform=web&payment-ui=stripe-hosted#test-microdeposit-amounts-and-descriptor-codes
ah OK I forgot the +test_email part
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
OK. But then, where can I input the test MICRODEPOSIT VALUES?
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.
OK so https://dashboard.stripe.com/account/activated shows me that we are activated ("Thanks for activating your account!")
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
and did you add the +test_email?
my customer email is francois.allain+test_email@gorgias.com ,
https://dashboard.stripe.com/test/customers/cus_RD8fnbNVNRv0NL
and we do send the customer.email when calling
stripe.confirmSetup in the FE
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
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,
}
I've got the PM id : pm_1QUtPUI9qXomtXqShXw9RLyE
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
OK...
email: billingContact?.email
I think this is overriding the value you're passing
How did you get the email used in the SI from the PM id I gave you?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I looked at the setup confirmation request
OK got it working