#caleb_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/1346215693657313411
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Using PaymentElement with SetupIntents
Hello
You can use payment_method_types parameter to override your account level payment method configuration.
https://docs.stripe.com/api/setup_intents/create#create_setup_intent-payment_method_types
So when you create the SetupIntent, you can pass payment_method_types: ['card','link'] even if you have link turned off in your settings
I actually need to do the inverse in this situation: have Link enabled in Settings, and not available on the specific page.
Passing only ["card"] still shows the Link options
Oh I think I misread the ask.. Sorry about that..
When you have link enabled, it can show up on elements in a few different ways.
I suspect link is showing up in passthrough mode and I don't think you can control that via a parameter
That's frustrating
have you tried creating a separate payment method configuration for this?
So let me explain a little bit more about the situation
Instead of using payment_method_types, you could try using payment_method_configuration param instead
I work on a donor management/CRM system where we support using a variety of different processors. We have clients who use Stripe through our white-label Connect integration, but we also have some who want to use our system with a standard Stripe account. So I'm in a situation where I need to control whether Link appears without necessarily having access to the client's Stripe dashboard.
We also work with clients with a wide range of techincal ability, so the less we have to try to customer support walk them through how to disable stuff like link in their Stripe dashboard, the better.
Gotcha. I just tested creating two different payment method configurations, one with link and one without link.
I pass pmc_xx when creating the SetupIntent using payment_method_configuration parameter. It works as expected and hides link where it's turned off.
However, there's some nuances when it comes to working with Stripe Connect and Payment Methods. What sort of connect charges are you currently creating? Destination Charges or Direct charges?
When you create destination charges, we use platform's payment method configuration by default.
When you create direct charges, we use connected account's payment method configuration
This would be direct charges in a non-Connect context. They're just inputting their pkey/skey pair in settings on our platform, and we're managing the checkout process for them.
It sounds like the answer is, "There isn't a way," and we'll just have to walk them through disabling Link across their entire account.
I was hoping there was a smoother way of handling it.
It sounds like the answer is, "There isn't a way," and we'll just have to walk them through disabling Link acorss their entire account.
Not exactly. Using payment method configuration is a valid alternative - https://docs.stripe.com/payments/payment-method-configurations?dashboard-or-api=api
Depending on if you want to render link or not - you can create a PMC on the account and pass it's ID to SetupIntent's payment_method_configuration parameter
but yeah, there's no way to disable link directly on the PaymentElement
Right, but they'll still have to create that configuration for themselves if we don't have dashboard access through Connect
Oh, ok
So it's something we could create when onboarding them to use the integration, then just use going forward.
Yup
Thanks, I'll give that a try on my testing account.