#avgn

1 messages · Page 1 of 1 (latest)

deft driftBOT
cobalt panther
#

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

scarlet thunder
#

👋 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

cobalt panther
#

But card mode already doesn't ask name by default

#

Only us_bank _account (ACH) asks that

scarlet thunder
#

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

cobalt panther
#

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

scarlet thunder
#

the country of the customer

cobalt panther
#

Any example country you remember which would show it

scarlet thunder
#

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

cobalt panther
#

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

scarlet thunder
#

but for the time being I guess the solution I gave you earlier would be better appropriate

cobalt panther
#

As for card I believe the status is always synchronously passed to us and updated

scarlet thunder
#

but what if the user closed the window before you get redirected to the success page?

cobalt panther
#

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

scarlet thunder
#

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

cobalt panther
#

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

scarlet thunder
#

I'm not really following what you're trying to achieve here

cobalt panther
#

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 ?

scarlet thunder
#

yes

cobalt panther
#

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

scarlet thunder
#

the return url won't be used unless the payment either is synced and it succeeded or if the payment is async

cobalt panther
#

But in the return url the intent status is not succeeded

scarlet thunder
#

and you can even choose whether you need to redirect or not

cobalt panther
#

Okay so for an instantaneous payment mode (card in this case )
The return url is only called if status is succeeded correct

cobalt panther
#

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

scarlet thunder
#

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.

cobalt panther
#

So US cards and Ach don't fall here correct

#

Only if 3d secure is enabled then it may be considered 'redirect based'?

scarlet thunder
#

not really

#

because if you stick with the default implementation the 3DS will be using a popover instead of a redirection

cobalt panther
#

Okay so again in that case it's not redirect based. Got it

scarlet thunder
#

unless you use redirect: 'always' the return_url won't be used for non-redirections

cobalt panther
#

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 ?

scarlet thunder
#

you have to call it yes

#

redirect: if_required is a parameter of confirmPayment

cobalt panther
#

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

scarlet thunder
#

if you pass setup_future_usage then yes

#

regardless of whether it's on or off_session

cobalt panther
#

Hmm it maybe bit scary for the user because it gives an impression we can use their cards anytime which is not entirely true

scarlet thunder
#

this is needed for PCI compliance

cobalt panther
#

Alright

#

--
And also for the same customer the next time I am making a payment element , that text is not showing up even if I set setup future usage. Is that also correct ?

scarlet thunder
#

I'm not sure, but I think if they already "signed" the mandate then it's probably the case

#

when I say "signed" the mandate I mean they agreed that they authorize you to make payments on their behalf