#bmbrina_code
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/1383149653159182517
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Not sure if I selected the correct option, but was there anything that changed recently?
The code provided is how we generate the account session
This is how we get the instance in our frontend application
const [stripeConnectInstance] = useState(() => {
if (!isPaymentsEnabled) {
return undefined;
}
const fetchClientSecret = async (): Promise<string> => {
const res = await createAccountSession({
variables: {
data: {
stripeAccountId: currentClinic?.submerchantStripeId || '',
},
},
});
return res.data?.stripeCreateAccountSession?.clientSecret || '';
};
return loadConnectAndInitialize({
publishableKey: env.REACT_APP_STRIPE_API_KEY,
fetchClientSecret: fetchClientSecret,
appearance: connectComponentAppearance,
});
});
And this is how we're showing the Connect component
<ConnectPaymentDetails
payment={stripeId}
onClose={onClose}
onLoaderStart={(): void => setIsDisputeDrawerLoading(false)}
onLoadError={({ error }): void => {
toast({
title: error.message || 'Error loading dispute information',
description: 'Please refresh the page and try again.',
status: 'error',
});
setIsDisputeDrawerLoading(false);
}}
/>
This is an example network request for the payment details
And this is for the same component where it appears like the /dispute call doesn't return anything
Any guidance is appreciated since we haven't changed anything on our side recently
Today we got word that that's no longer the case.
Where did you get this information from? Could you share the email or doc?
Oh, what I meant is we got a support ticket from one of our customers that they can't manage the dispute
The Stripe dashboard shows logs where they were able to add some information to the dispute from 6/11
So there's saved data but the dispute evidence hasn't been submitted yet, likely because the action disappeared from the UI 🤔
That one is a destination charge
This one is a regular charge and this sort of detail is what we are used to seeing for destination charges as well
Could you share the example Payment Intent (pi_123) with the issue you're describing?
This is the pi from our account: pi_3R4744GF9ZPA9WP50CRsvUtx
And this is from the destination charge: py_1R474E4hawgycgB1WBGUqCrH (what we're passing to the Connect component)
Hi taking over here
That looks like a separate charge and transfer not a destination charge
As far as I know dispute management within the ConnectPaymentDetails component is only supported on a destination charge that has on_behalf_of set. Not regular destination charges and not separate charges and transfers
This is to match the express dashboard behavior
But it was working up until a few days ago? Using the py is what was suggested to me a couple of months ago in this Discord 😓
The charge is from a subscription and what we do is transfer that to the client's Stripe account and it was working fine. We first released this in January or February
It only works for destination on_behalf_of
The example you shared is separate charges and transfers on_behalf_of
We also had a bug that was resolved a few weeks back where we were unintentionally surfacing disputes in the embedded component and in the express dashboard for separate charges and transfers
But we since resolved it
As it was unintentional
And our docs explicitly state that it's not supported
Ah so that might have been why it was working
Could have been
We should have sent out comms for that as well if you were impacted
Are you the account holder?
Nope, just a dev
So what changes do we need to make for it to work? Do we need to manually set on_behalf_of when we process the subscription charge?
No you'd have to switch to destination charges
Current fund flow doesn't work
ie set the account within transfer_data
instead of making a separate api request to transfer the funds
And yeah you'll need to keep on_behalf_of as well
With that flow there's no need to manually transfer funds. It's done automatically at the time of the charge
And it's the only fund flow supported for dispute management in embedded components and the express dashboard
I think we do it this way because we take a percentage of the subscription before passing it on to the client's account
I'm going to add a colleague to the thread who is more familiar with how we transfer the funds, is that ok?
Sure
@cursive arrow
yo
Hey! The relevant bits are from when codename_duchess joined the thread
Cool, I believe we originally changed it from destination charges because we ran into issues because we charge a mix of a flat fee and a percentage ($15 + 5% of the plan) as an application fee and we could only use a percentage charge and we were off in our rounding, which was messing with different reports.
I didn't do that original work, but the dev who did gets back Monday
so he might have more insight
@west anvil From the docs it looks like only a percentage is accepted still, is there any workaround for that or any recommendations you could give us?
Sorry deleted my last message as I realized it didn't make sense as soon as I typed it
But yeah we only support percentages with subscriptions
Trying to think of the best workaround but there's not really a great one
Especially if you want all of this manageable in that dispute flow
I suppose you could keep the 5% as the application fee and then do an account debit to reclaim the $15
I'm not super familiar with the API support for disputes, would it be the kind of thing where we could surface that information in our app and then programatically submit forms?
Yeah so with destination charges and separate charges and transfers, the platform is responsible for disputes
You can manage this via the api: https://docs.stripe.com/api/disputes
So you could build a UI in your app that calls those endpoints
We'll discuss these options with our team then!