#avgn
1 messages · Page 1 of 1 (latest)
I know payment element doest support cardholder name
But I think we can add a custom text field, but not sure how to pass it to the element
👋 happy to help
this helps you collect billing details including the Name (you can customize which fields you want) but only when Stripe deems them necessary
so if you really want to always collect some of that information you should pass never to the billingDetails property and create your own input fields and when you're confirming the PaymentIntent you can use the https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent-options-confirmParams-payment_method_data-billing_details param to pass in the values you collected
But card mode already doesn't ask name by default
Only us_bank _account (ACH) asks that
for some countries the billing details is also collected for cards
and for other types as you mentioned
so if you want a more consistent UI it's better to "never" show the billingDetails fields
and create your own
Oh okay
Will need to try it out once
When you say some countries
How is that country determined , by the country selected in payment element or the country of the Stripe account
the country of the customer
Any example country you remember which would show it
just fyi, soon Stripe is releasing an Address Element
for now it's in beta mode, if you want you can contact support via https://support.stripe.com/?contact=true and ask whether you're eligible to be part of the private beta feature
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
Okay
Some other questions
For Ach as status of payment intent goes into processing always so we rely on the payment succeeded webhook to mark the order as completed etc etc
For card can we skip the webhook and directly use then status of the intent that we get from the return url
but for the time being I guess the solution I gave you earlier would be better appropriate
As for card I believe the status is always synchronously passed to us and updated
but what if the user closed the window before you get redirected to the success page?
Hmm correct so clear out this for me
What are the different statuses that can be there for a card payment intent
Like in Ach it's always 'processing'
Different statuses in the return url I mean
I think you shouldn't really care about this
the only thing you care about for cards is the payment_intent.succeeded
you can discard any other events
Means if in the return url when I check the intent status if I don't get succeeded I reload the page again and ask user to retry
It won't happen ideally as most errors are shown directly in the UI itself but still asking for completeness
I'm not really following what you're trying to achieve here
See as you are aware that most card errors are shown in the element itself correct , that is without calling the return url , basically in the JS?
Is this point clear ?
yes
Okay so I mean to ask that is there any case where the JS error won't come and the return url will be called
the return url won't be used unless the payment either is synced and it succeeded or if the payment is async
But in the return url the intent status is not succeeded
and you can even choose whether you need to redirect or not
Okay so for an instantaneous payment mode (card in this case )
The return url is only called if status is succeeded correct
please read this section https://stripe.com/docs/js/payment_intents/confirm_payment#confirm_payment_intent-options-redirect
Ah yes I have read those , one point it says which wasn't clear
'redirect based payment method' it says
What are these. I mean what modes fall in this category
redirect-based payment methods are PM that requires you to authenticate or do some kind of action on our partners page such as klarna, iDeal, etc.
So US cards and Ach don't fall here correct
Only if 3d secure is enabled then it may be considered 'redirect based'?
not really
because if you stick with the default implementation the 3DS will be using a popover instead of a redirection
Okay so again in that case it's not redirect based. Got it
unless you use redirect: 'always' the return_url won't be used for non-redirections
Okay so we can set it to 'if required' for both card and Ach
And then it won't go to return url
But the confirmPayment JS function will be called correct ?
Yes got it
Couple of more questions
Regardless of if I set
set up future usage as
On session or off session
The short disclaimer type text that comes below the element , ' you authorize XYZ to make payments on behalf of you...'
The message is the same. Is that correct behavior
if you pass setup_future_usage then yes
regardless of whether it's on or off_session
Hmm it maybe bit scary for the user because it gives an impression we can use their cards anytime which is not entirely true
this is needed for PCI compliance