#redbull_docs

1 messages ¡ Page 1 of 1 (latest)

spare craterBOT
#

👋 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/1227394648914399363

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

ancient sealBOT
spring river
#

Hi there! Do you have a PaymentIntent ID you can share?

delicate sentinel
#

hm, let me find one

#

give me a few minutes

#

how do I translate this created to date time?

#

just want to find you the most recent payment intent

spring river
#

You can use something like https://www.epochconverter.com/

but no need, you can copy/paste the ID from the start of that client secret, the one that begins with pi_

delicate sentinel
#

thanks, let me see

#

pi_3P3nvKLE5rsCgveV0WOckKto

#

does such id work for you?

#

the thing is that the checkout form is shown first and I don't see the bank transfer option. Then I selected payment with card. Payed and then payment intent has been created

#

in case you need client secret here it is for this pi
pi_3P3nvKLE5rsCgveV0WOckKto_secret_WmPqRrMnaA2OIbK2kVRs7uqWC

spring river
#

Ah, I think the only way I can get Bank Transfers to show up in the PaymentElement if I use the deferred intent flow is to explicitly pass paymentMethodTypes: ['customer_balance',...] in the options to initialize Elements

delicate sentinel
#

interesting, let me test this quickly

#

true, it worked, thank you. Although, in such situation I won't be able to use dynamic payment methods set up from dashboard. Right?

#

or there is a possibility to load these mehods somehow?

#

on front-end

#

ok, I need to go but if you have time for answering these two questions I'd appreciate your help.

  1. I can see that currency is required field in Elements options. Although, how do I know which currency the customer will use if I serve customers from all over the world?

  2. Is there a way to dynamically show the amount of money with deducted stripe fee to customer. Let's say he selects card payment with 2.9% stripe fee and he entered $100 in the input. Can I show him $97.1 somehow? How do I know which payment method he selected before the customer submits the checkout form?

spring river
#

Sorry for the delay!

delicate sentinel
#

no worries

#

could you answer thes equestions as well or I should create a separate topics for them?

spring river
#

Okay, so currently there's no way to use dynamic payment methods with Bank Transfers. You'll need to explicitly pass paymentMethodTypes with customer_balance to present Bank Transfers in the PaymentElement.

#

I can see that currency is required field in Elements options. Although, how do I know which currency the customer will use if I serve customers from all over the world?
I recommend adding some sort of currency or country selection prior to having the customer land in your payment page (can be part of their account registration or something), or you choose for them. It really depends on where you want any foreign exchange to happen

delicate sentinel
#

from the specified one

spring river
#

Well, let's say you present a price in 'usd' but the customer's card is based in MX. The customer's bank may charge them a foreign exchange fee to pay in 'usd'

#

Separately, you mentioned you're working with Connect so I recommend looking through this as well so you're acquainted with the difference between presentment and settlement currencies as well: https://docs.stripe.com/connect/currencies

delicate sentinel
spring river
#

Is there a way to dynamically show the amount of money with deducted stripe fee to customer. Let's say he selects card payment with 2.9% stripe fee and he entered $100 in the input. Can I show him $97.1 somehow? How do I know which payment method he selected before the customer submits the checkout form?
Not sure I quite follow.

delicate sentinel
spring river
#

For a $100 charge, the customer will always pay $100. The amount settled to your platform will be minus the fees

delicate sentinel
#

I want to make interactive UI where let's say the customer selects card and I show him $97.1, he selects bank transfer and I show him $92

#

so, he can choose the preferable payment method. So, the question here is how do I get the payment method selection on the UI from payment element

#

Am I clear or not really?

spring river
#

Yeah, I think I understand. I think you likely want to present them with a selection/menu of payment method types before rendering the PaymentElement. Then, based on what they choose, use those values to determine the options you use when creating the Elements instance, including the amount.

delicate sentinel
#

yep, that's a possible workaround. Thank you for your answers. Highly appreciate your help!