#caleb_api

1 messages ¡ Page 1 of 1 (latest)

hollow plumeBOT
#

👋 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.

waxen atlas
#

Using PaymentElement with SetupIntents

coral stone
#

So when you create the SetupIntent, you can pass payment_method_types: ['card','link'] even if you have link turned off in your settings

waxen atlas
#

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

coral stone
#

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

waxen atlas
#

That's frustrating

coral stone
#

have you tried creating a separate payment method configuration for this?

waxen atlas
#

So let me explain a little bit more about the situation

coral stone
#

Instead of using payment_method_types, you could try using payment_method_configuration param instead

waxen atlas
#

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.

coral stone
#

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

waxen atlas
#

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.

coral stone
#

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

waxen atlas
#

Right, but they'll still have to create that configuration for themselves if we don't have dashboard access through Connect

coral stone
#

You can do that via the API

#

You don't need dashboard access for that

waxen atlas
#

Oh, ok

#

So it's something we could create when onboarding them to use the integration, then just use going forward.

coral stone
#

Yup

waxen atlas
#

Thanks, I'll give that a try on my testing account.