#m0uka_api

1 messages ยท Page 1 of 1 (latest)

sinful gobletBOT
#

๐Ÿ‘‹ 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/1222613088491143178

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

gilded mossBOT
queen jasper
#

Hi, the Payment Element would not show a payment method that is not supported in that country. You can confirm that Klarna, https://docs.stripe.com/payments/klarna > 'Supported customer countries' is available for customers who are located outside of the US.

west crypt
#

Yes, but our US-based business cannot transact with customers outside the US, as stated in your linked article

#

The same thing occurs with Cash App Pay too

#

The payment method is displayed, but once attempting to pay, an error occurs:
Cash App Pay does not support 'CZ' as the billing country, it only supports 'US'.

queen jasper
#

To confirm, you have a customer who has a 'CZ' billing address. You pass that address when you create the Element on an account that is located in the US and the customer can see Cash App?

west crypt
#

exactly

gilded mossBOT
west radish
#

๐Ÿ‘‹ stepping in

#

To be clear, you are setting billing address as a default value here before Payment Element creation?

west crypt
#

yes. we are passing in billing details like this

west radish
#

That looks like you are passing this to confirmPayment(), no?

#

So that the billing country is set to CZ

west crypt
#

oh I see

west radish
#

At that point, CashApp shouldn't appear

west crypt
#

does the React Stripe.js library support this?

west radish
#

Yep

#

You pass it to your options prop

west crypt
#

got it, we are probably on an older version so I don't see it in the props

#

sorry for the confusion, thanks for the help

west radish
#

No worries

west crypt
#

hmm, just tried to populate the defaultValues with the address in the PaymentElement options, and it still seems to display the other methods, could it be due to me being in test mode?

west radish
#

You see the country of PaymentElement set to CZ and you still see CashApp?

#

Can you show me a screenshot?

west crypt
#

yes, attached some screenshots

west radish
#

Hmmm odd. Give me a min to look further

#

My colleague is still doing some testing here

#

I was under the impression it would hide Cash App in this case.

#

Will circle back shortly

west crypt
#

no rush, trying out stuff on my end too

#

i can provide the client secrets/IDs if needed

west radish
#

Okay @west crypt sorry for the delay. Looks like this is actually a bit more complex than expected and for a variety of reasons we don't hide CashApp in this scenario. I'm going to file feedback internally as I think we should look at changing the behavior here.

For now, your workarounds are either to:

  1. Just throw an error in this case if the customer tries to use CashApp
  2. listen for the change Event (https://docs.stripe.com/js/element/events/on_change?type=paymentElement) and show an error proactively if the customer selects CashApp
  3. User the Payment Methods Config API (https://docs.stripe.com/payments/multiple-payment-method-configs?dashboard-or-api=api) to select which payment method types you show... so for a non-US customer you exclude CashApp
west crypt
#

that's a shame because we already do 1 and it confuses a lot of EU customers. thanks for the help anyway

#

will look at 3 though

west radish
#

Yeah agree that this isn't the best experience right now.

#

But yeah I'll file feedback and hopefully we will adjust this for better UX

west crypt
#

thanks, enjoy the rest of your day