#gewibu_payment-element-payment-methods
1 messages ยท Page 1 of 1 (latest)
๐ 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.
This is the button I would like to disable or hide
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.
Sure hold on
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?
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
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?
We are creating the Element using a clientSecret
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
I think this is right: pi_3TFd8AJHVyuda2Tn8Qrbr0uW
I had to transcribe it from a screenshot someone sent me
Are you the engineer building this integration?
Yes
That is not a valid ID
You should be able to test this then, right?
And generate a fresh Payment Intent?
Yeah I thought it was worth a shot, let me generate a new one
pi_3TFeE0JHVyuda2Tn08GxMfP0
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
Oh awesome, that's exactly what I was looking for! Thank you!
Sure thing, happy to help ๐