#rafaelbaptista-express-refunds

1 messages · Page 1 of 1 (latest)

graceful marsh
#

Hi there! I wish I could help, but this chat is focused on developers and technical questions. Our support team will be able to assist you better than I can: https://support.stripe.com/contact/email

urban canopy
#

i'm a developer, and i'm asking a question regarding how could i make a refund as an coonected account

graceful marsh
#

Refunds work roughly the same for all account types. Can you be more specific?

urban canopy
#

I'm implementing stripe express, and i'm using destination charges. Rn my platform have a refund system where they can refund a checkout or partial of the amount of the checkout to the system balance.

I want to allow my connected accounts also to make refunds with stripe, but in order to make this possible i need to know if that is a standard pratice and if is possible to make a call as an standard account and issue a refund

#

From what i saw the refund will pull the funds of the charge from the platform, not the connected account .. i wanted to know if its possible to pull the funds from the connected account when do a refund

#

do you need more information?

graceful marsh
#

On destination charges I believe the charge is refunded from the connected account's balance already by default and it pulls from the platform balance only if the connected account's balance goes negative. Do you have an example of a refund where this wasn't the case?

urban canopy
#

just need to confirm , so i can how what approach should i use

graceful marsh
#

Apologies for the delay. Looking at this now

#

Ah, okay I think transfer_data[destination] behaves a little different than simply using on_behlaf_of. You're right. It looks like you would have to create reverse transfers alongside refunds in order to recoup the funds.

urban canopy
#

Im using transfer_data with on_behalf_of

#

On the documentation that i sent you says that if i pass reverse_transfer to true the amount is charged back auto from the connected account

#

Can you confirm this ?

graceful marsh
#

That is correct. Stripe handles creating the reverse transfer for you when enabled. The reverse transfer would be created automatically

urban canopy
#

If i make the call with Stripe private Key of the platform how can make the call as an connected account

#

Because on my system is the connect account that would decide if they want to refunds the check-out or not

graceful marsh
#

You won't be able to create reverse transfers using the connected account's API keys. Since you're using Express, you would need to create a separate portal for them to initiate refunds on their end

urban canopy
#

Do Stripe have any documentation on this?

#

Because from what understand the connected accounts because are express account Will Lose the classic dashboard of stripe

#

So how should i approach the refuunds on my case in order to make refunds as connected account

graceful marsh
#

Right, so this is because you're using Express, which essentially means that your users are given a pre-configured Dashboard to log into (provided by Stripe) which gives them limited functions/features. Allowing them to create refunds is really more in the purview a Custom Connect.

#

In lieu of using Custom Connect, you would have to find a solution on your end to allow your users to create refunds

urban canopy
#

But the refund is a feature of Stripe so Stripe dont explain if i can issue refunds as a connected account

#

example:

I have a system where i can have multiple locations witch means multiple connected accounts.

WHen a user checkouts on front store they choose the location where they can to buy from to when the cart is closed a checkout is generated (using charge with destination charges w on_behalf_of).

After a checkout is created the Location can currently choose if they want to refund the entire checkout or only certain items. If they choose one item or the full checkout that amount is refunded to the system balance.

What i wanted to implement was give the hability to the location to choose if they wanted to refund to balance or using stripe, witch means that the call would be triggered by the connected account action

     $submit = \Stripe\Refund::create([
                "charge" => $checkoutDetails["externalId"],
                "amount" => $amount_to_refund,
                "refund_application_fee" => true,
                "reverse_transfer" => true // pull the funds back from the connected account
            ]);

can you please help me figureout if this is possible?

pine star
#

Hi there, stepping in for @graceful marsh as they need to step away. Give me a moment to catch up.

#

Sure, you can allow an Express Account to refund by providing them a UI to do that. But refunds are not a feature provided natively with the Express Dashboard.

urban canopy
#

you are still checking or that was the answer? srry dindt understand

pine star
#

Yes that is an answer. You can build a Dashboard yourself if you want to give the Connected Account the control here. But this is not something that Express Connect provides.

urban canopy
#

i planned to integrate the refund of stripe on my current system not building a complete different dashboard

#

that's why i'm asking if the connected account can make the call to create a refund with stripe private key of the platform

pine star
#

You control everything here with your platform and platform key's when using Express. You pass the Connected Account header if you want to actually make requests on the Connected Account. With refunding here you wouldn't want to do that — the charge will live on your platform since it is a destination charge. So we would not recommend that you provide the Connected Account access to your actual secret key, but yes you can provide them the ability to do this — that is what I mean by "building a UI". You would give the Connected Account some sort of button or screen that allows them to initiate the refund and uses your secret key on the backend.

urban canopy
#

sorry , thanks for clarifying:
" You would give the Connected Account some sort of button or screen that allows them to initiate the refund and uses your secret key on the backend." and this a correct approach to do it?
I dindnt do it because i was sure if would be a correct approach to use the platform secret key on the backend to perform an action triggered by the connected account

pine star
#

Yes that is the only way to do this. And it is the correct way — you are in control of everything here as the platform. Every action has to be performed using your secret key.

urban canopy
#

Alright so even calls performed by a connected account i can use my API secre Key of the platform...

Regarding the disputes i had the same question this morning and another member of suport told me that i should not use my API platform secret to submit evidence as a connected account, can you confirm this?

pine star
#

I'm not sure what you mean by that? With Destination charges all of the disputes will live on your platform, so you will have to respond to them on your platform with your secret key (or through the Stripe Dashboard). It is up to you, and mostly depends on your mode, for whether you respond to them yourself, or give your Connected Accounts a method to provide that info. But either way, it has to be using your Secret Key.

urban canopy
#

This is a quote from that chat :

"Submitting the evidence on the other hand is something that the Platform should handle and not the connected account
since the Payment was initially created but the Platform (as a Destination Charge)
so what i was asking if stripe allow connected accounts to submit evidence insted of the platform
in that case you could do something in your Platform's application to let the Connect Account know about the dispute and submit to you the evidence which you would eventually submit to the Stripe API on their behalf afterwards"

pine star
#

Yes exactly

#

So in the end "you" are submitting the evidence since you use your secret key to do that.

#

The Connected Account should not access your secret key directly.

#

But still, in the grand scheme, you can design it so that the Connected Account provides the evidence if that is your model.

#

When it gets submitted, your secret key will be used.

urban canopy
#

Hm from that chat i was under impression that i couldnt do that because was not recommend

pine star
#

In the end you as the platform are responsible for responding to the disputes here. You will incur the dispute fee as the platform since the charge is on your platform.

#

So the expectation is that you "handle the disputes". If this means that you need to gather evidence from your Connected Account users in order to properly "handle the disputes" and submit that evidence, then that is totally fine.

urban canopy
pine star
#

That is up to you for how you trigger the actual submission.

#

If you want to provide the Connected Account user a button that they click which submits the evidence then that's fine. But it is still your responsibility as the platform if they end up clicking that button or not (meaning if they actually submit the evidence or if they don't).

urban canopy
#

ahh i see it , do you have any advise if i should give the ability to show the button or if is best to actual do like the pre-submission and then the plaform do the actual submit?

#

So from what i understand is also fine using this approach on the refunds and place the button where the connected account can issue a refund using my platform keys right?

pine star
#

Yes exactly.

urban canopy
#

Thank you for the clarification

pine star
#

Sure!