#gewibu_payment-element-payment-methods

1 messages ยท Page 1 of 1 (latest)

pallid haloBOT
#

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

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

north kelp
#

This is the button I would like to disable or hide

warm vine
#

Do you have a Payment Intent ID we can look at to investigate? The Payment Method Configuration ID would be useful as well but I can also pull that up if you have the account ID handy.

north kelp
#

Sure hold on

pallid haloBOT
warm vine
#

Also to make sure i'm understanding correctly. If Credit or Debit is selected at the top you only want card to display in the Payment Element and if Bank Account is selected you want the element to only display bank account?

north kelp
#

Oh sorry I shouldn't have included the top section because I think it is causing some confusion. My only goal here is to display the Stripe Element in JS and have it NOT offer US bank account as a payment option- only Card

#

acct_1PpxPuJHVyuda2Tn is our account

#

Do you need a specific payment intent ID to investigate this? I figured this would be a case where I can configure the element to not show those options

broken gust
#

Hi ๐Ÿ‘‹

I'm stepping in as my colleague needs to go

#

How are you creating the Payment Element? Are you using a clientSecret or creating the Elements session without an intent?

north kelp
#

We are creating the Element using a clientSecret

broken gust
#

In that case, the reason we are asking for an example Payment Intent ID is that determines what payment methods are available for the Payment Element. We can investigate further if you provide this information

north kelp
#

I think this is right: pi_3TFd8AJHVyuda2Tn8Qrbr0uW

#

I had to transcribe it from a screenshot someone sent me

broken gust
#

Are you the engineer building this integration?

north kelp
#

Yes

broken gust
#

That is not a valid ID

#

You should be able to test this then, right?

#

And generate a fresh Payment Intent?

north kelp
#

Yeah I thought it was worth a shot, let me generate a new one

#

pi_3TFeE0JHVyuda2Tn08GxMfP0

broken gust
#

Taking a look

#

Okay so you are passing automatic_payment_methods.enabled: true in this request. So Stripe is dynamically calculating what Payment Method Types are valid for this Payment Intent.

You can see what we consider valid in the response:

payment_method_types: [
    "card",
    "link",
    "us_bank_account",
  ],
#

If you want to force this to be card only, you would replace the

automatic_payment_methods: {
    allow_redirects: "never",
    enabled: "True",
  },

parameter with payment_method_types: ['card'] in your creation request

north kelp
#

Oh awesome, that's exactly what I was looking for! Thank you!

broken gust
#

Sure thing, happy to help ๐Ÿ™‚