#heisend3rp
1 messages ยท Page 1 of 1 (latest)
I'm trying to do this via the webiste btw
hi! probably then you can't really turn it off, just a weird quirk.
What are you really trying to test? For example you could just create your PaymentIntent or whatever and explicitly pass payment_method_types:["card"] if you don't want SEPA to appear
It's a bigger problem.
We started to deactivate sepa payments for all connected accounts by standard (disputes and stuff ๐).
We still have saved payment methods in the user. And we retrieve them server side. Afaik stripe checkout component doesn't support displaying saved payment methods.
Since the api returns all saved payment methods for a given type, I added a small check up before, to see if the connected account has sepa debit activated or not.
I'm already done with implementation, I just need to test if it worked ๐
hard to dig in really since you're already quite deep, might help if you had the code/API calls you use to do these checks
but overall the frontends either use automatic payment methods(and you then configure that in your platform Dashboard on an all-connected-account basis, AFAIK you can't really have a method only active for certain acocunts and not others), or you use payment_method_types explicitly and pass the methods you want
let isSepaActive = false;
if (tenant.stripeAccount) {
const stripeAccount = await stripe.accounts.retrieve(
tenant.stripeAccount,
);
isSepaActive =
stripeAccount.capabilities?.sepa_debit_payments === 'active';
}
const savedCards = await stripe.paymentMethods.list(
{
customer: userStripeCustomerIdForTenant,
type: 'card',
},
{ stripeAccount: tenant.stripeAccount },
);
let savedSEPA: Stripe.ApiList<Stripe.PaymentMethod> | null = null;
if (isSepaActive)
savedSEPA = await stripe.paymentMethods.list(
{
customer: userStripeCustomerIdForTenant,
type: 'sepa_debit',
},
{ stripeAccount: tenant.stripeAccount },
);
const allSavedPaymentMethods = [
...savedCards.data,
...(savedSEPA ? savedSEPA.data : []),
];
yes we use automatic payment methods.
Yes you can set standards and the connected accounts decide on their own. Pretty new feature, pretty neat
ok, so you check their capabilities
I just need to overwrite in connected account ๐ข
not sure what you mean by overwrite but I don't think you can and it doesn't work that way for Standard accounts, the settings you have are https://dashboard.stripe.com/test/settings/payment_methods/connected_accounts , or to use payment_method_types explicitly
Each connected account can override the default payment method setting below, excluding any you block access to.
yep, and they would log into their dashboard and do that(you as the platform can't control it)
it doesn't work in test mode I suppose because weird test/live mode account stuff I guess
ok, weird test/live mode account stuff I guess it is
can you write a bug report? ๐
thanks ๐
best to write to https://support.stripe.com/?contact=true to raise issues
too lazy for that ๐
have a good day, and thanks for the help ๐
@eternal peak capabilities doesn't work. it still active event though it's disabled now for the connected account (blocked it for all connected accounts in test mode).
How can i check if sepa is active for an account or not?
as far as I know you can't
I can verify that the change worked, since the checkout element does not show sepa any more
the Capability is just "can the account support this, has it onboarded to the method" (it's an older API that predates this whole automatic payment method feature)
it's different from if it's enabled on their dashboard and as far as I know there's no API access to those settings
this would be so much easier if the payment element would support adding a stripe customer id. and then showing supported & saved payment methods for this stripe account/ stripe customer
so there is no way we can do this for now?
guess error message after payment attempt is the best solution then?
(but its super bad ux)
not for now but we do have various plans for making the client-side display of saved payment methods better