#abishek-confirmcardsetup-returnurl
1 messages · Page 1 of 1 (latest)
what is the purpose of returnUrl?
in which context? Where do you see it?
okay so you are literally just reading the reference and trying to make sense of it? This is useful if you don't use our UI, it's what the docs say
If you are handling next actions yourself, pass in a return_url. If the subsequent action is redirect_to_url, this URL will be used on the return path for the redirect.
did that unblock you?
ok, makes sense. so, I am using the stripe UI. so I don't have to use it. But how does 3ds work in case of stripe UI? does it open a modal window and handle everything there, so there is no redirection involved at all?
correct modal and no redirect
if I am using the payment element, can I use confirmCardSetup or is it necessary to use confirmSetup? The reason is, in that case as well I am using the stripe UI, but return url is mandatory
it's required to use confirmSetup in that case.
ok, thank you for clarifying. appreciate it
when using the card element, stripe automatically knows which country to format the postal_code for. Is there a way to know which country the stripe identified?
Sorry for the wait! Unfortunately, I don't believe there's a way to know the country that Stripe identified which interacting with the card element. The only thing I could think of would be to retrieve this after payment is complete
ok
is there a lifetime for a setup intent?
@prime shuttle we recommend creating them on demand as you need them. No point keeping them around
ok, the confirmCardSetup returns an error indicating that the email id is invalid. Any reason why this would happen?
I am passing the card and billing_details, but i am not sending any email id
Here is the error returned
And here is my code
Are you passing a valid email?
that call doesn't require an email, so I am not passing anything
nvm, figured it out.
the globals had the email key on it with nothing passed which isn't required.
perfect
how do I pass the font size using the appearance API https://stripe.com/docs/stripe-js/appearance-api#commonly-used-variables
I see a fontSizeBase, am not sure what to pass in there
have you tried passing a number?
I just tried fontSizeBase: '20px' which seems to work and increase the font size
ok, I tried to pass 1rem that did not work
should I specify only in px?
Here is what I tried.
don't see the font family being set or the size
am I missing anything?
This is what I see. the font on the country field uses the fontFamily Open Sans and the font size is 1 rem
that's not how the API is designed right? fontSizeBase is under variables
// Fully customizable with appearance API.
appearance: {
fontSizeBase: '26px',
theme: 'stripe',
variables: {
colorPrimary: '#0570de',
colorBackground: '#ffffff',
colorText: '#30313d',
colorDanger: '#df1b41',
fontFamily: 'Ideal Sans, system-ui, sans-serif',
spacingUnit: '2px',
borderRadius: '4px',
fontSizeBase: '26px',
// See all possible variables below
},
},
};```
this works for me
it's only for PaymentElement
that API will not work with the card element
https://stripe.com/docs/js/appendix/style#style_object-fontSize that's what you use for the card element