#abishek-confirmcardsetup-returnurl

1 messages · Page 1 of 1 (latest)

strong burrow
#

there's no reason to pass returnUrl in that case

prime shuttle
#

what is the purpose of returnUrl?

strong burrow
#

in which context? Where do you see it?

strong burrow
#

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?

prime shuttle
#

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?

strong burrow
#

correct modal and no redirect

prime shuttle
#

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

strong burrow
#

it's required to use confirmSetup in that case.

prime shuttle
#

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?

rich fossil
#

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

prime shuttle
#

ok

prime shuttle
#

is there a lifetime for a setup intent?

strong burrow
#

@prime shuttle we recommend creating them on demand as you need them. No point keeping them around

prime shuttle
#

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

strong burrow
#

Are you passing a valid email?

prime shuttle
#

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.

strong burrow
#

perfect

prime shuttle
#

I see a fontSizeBase, am not sure what to pass in there

strong burrow
#

have you tried passing a number?

#

I just tried fontSizeBase: '20px' which seems to work and increase the font size

prime shuttle
#

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

strong burrow
#

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
prime shuttle
#

is appearance.theme mandatory?

#

does this work for card element or payment only?

strong burrow
#

it's only for PaymentElement

#

that API will not work with the card element