#guizhong_api
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/1479410199931392123
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
ไฝ ๅฅฝ
๐ฃ๏ธ Sorry, English only
We can only provide help in English on Discord, but you can contact Stripe support for help in other languages. ๐ Translate this message
I want to disable card payments on the br site, but the link is still displayed. How can I disable the link? (ExcludedPaymentMethodTypes: ['card'])
hello
The documentation at https://docs.stripe.com/js/elements_object/create_without_intent mentions the parameter excludedPaymentMethodTypes: ['card'], which I've set, but the link is still displaying.
This prompt will appear.
๐ Hi there! Let me take a look
Are you creating a Payment Intent and passing it to Elements here? Or using the Payment Element without an intent?
That option only applies when you are not using a Payment Intent. You would have to set this option when creating the Payment Intent: https://docs.stripe.com/api/payment_intents/object#payment_intent_object-excluded_payment_method_types
Okay, let me take a look.Hold on
But we did not use this payment method to create it.
Can you share a Payment Intent ID or request ID?
That's it. You would have to add excluded_payment_method_types there
req_FjRk6ZCCO3wWpp
stripe.elements does not display any logs in the console.
However, I included the excludedPaymentMethodTypes parameter.
In neither of those requests to create a Payment Intent, you are not setting excluded_payment_method_types: ['card']
You need to set that value when creating the Payment Intent on your backend: https://docs.stripe.com/api/payment_intents/object#payment_intent_object-excluded_payment_method_types
The excludedPaymentMethodTypes option is only used when creating Elements without a Payment Intent: https://docs.stripe.com/js/elements_object/create_without_intent#stripe_elements_no_intent-options-excludedPaymentMethodTypes
The payment was completed before the request to create the payment intent was made. I need to filter out card payments when creating the payment list.
hi! I'm taking over this thread.
is your goal to disable Link in the Payment Element?
yes
then this can be done in your Dashboard here direclty: https://dashboard.stripe.com/settings/link
I need to hide card payments on the Brazilian and Mexican websites, while displaying them on other websites, not completely hiding them.
I'm confused. are you trying to hide card payments, or link payments?
I want to hide the card payment option, but the link also shows card payment options, so the link also needs to be hidden.
got it. and what's your payment flow in the Payment Element? do you first create a PaymentIntent, and then use the PaymentIntent client secret to mount the Payment Element? or do you first mount the Payment Element, and then later create the PaymentIntent?
got it. then yes what you are doing is correct. you just need to disable the Link Payment Method in the Dashboard like I explained.
or you can disable it with code here: https://docs.stripe.com/js/elements_object/create_payment_element#payment_element_create-options-wallets
If I disable "Linked Payment Methods" in the control panel, will this payment method also be invisible on other websites?
if you want to diable link on just this specific page, then use wallets.link: never when you create the payment element (see link I shared above).