#doowire

1 messages · Page 1 of 1 (latest)

grim grailBOT
dusky mulch
#

Hello! We don't typically reopen closed threads, but you can ask new questions here!

brisk berry
#

Ok perfect! My problem is I am using Stripe Connect. When a Stripe Connect account refunds one of their customers, that payment is refunded in the general payments section of the Stripe Dashboard, but that refund does not appear in the Stripe Connect dashboard.

#

The reason this is a problem is because I want to be able to see how much each Stripe Connect user has refunded their customers

dusky mulch
#

Okay. Sounds like this is more of a feature request than a question?

brisk berry
#

No

#

I am curious if there is something I did wrong or if there is a workaround

#

I am curious if there is any direct code to control this dashboard

dusky mulch
#

There's no way to alter the behavior of the Stripe Dashboard with code.

#

Are you using direct or destination charges? Sounds like direct?

brisk berry
#

Direct charges

dusky mulch
#

With direct charges the connected account is responsible for refunds and whatnot, so that information shows up in their Dashboard rather than yours as the platform. I believe the Refunded tab in your screenshot is for destination charges.

#

Also note that your email address is in that screenshot, and this is a public server. You may want to delete it.

brisk berry
dusky mulch
#

I believe they would show up if you view the Dashboard as the connected account.

brisk berry
#

Ok but there is no way to access it from my end. Because I can see the refunds across all connects accounts in this Payments Section, but i cannot see the refunds in each individual connected account

#

For some reason all the payments remain "succeeded" even though they are refunded in the payments section

dusky mulch
#

Even when viewing the Dashboard as the connected account?

brisk berry
dusky mulch
#

Yeah, you can do all of this in test mode.

#

Just to clarify, I'm talking about this:

#

Are you using that option?

brisk berry
#

Just tried it. Yup, all the payments are still succeeded

dusky mulch
#

Can you give me the connected account's ID that you're looking at?

brisk berry
#

acct_1NIMVMQ161OctuFo

dusky mulch
#

That's an Express account... you're making direct charges on an Express account?

#

There are no refunds on this account in test mode.

#

So it makes sense that you wouldn't see any.

brisk berry
#

To clarify, a direct charge is your platform is directly charging a customer. The charge is made directly from the customer's card to the connected account, and your platform can take a fee.

dusky mulch
#

There are several failed attempts to create Refunds, but none I'm seeing that succeeded.

brisk berry
#

Where do you see the failed attempts?

dusky mulch
#

In the request logs for this account.

#

After you view the Dashboard as this account go to Developers > Logs.

#

In test mode.

brisk berry
#

I see those failed attempts. Not sure if that was past buggy code though

dusky mulch
#

To clarify, a direct charge is your platform is directly charging a customer.
That sounds like a destination charge to me, not a direct charge. If the Charge object lives on your platform account it's a destination charge. If the Charge object exists on the connected account it's a direct charge.

brisk berry
dusky mulch
#

That code doesn't really make sense to me... you're creating a refund on your platform account, then trying to list refunds on a connected account? Why?

brisk berry
#

Each Stripe Connect account I am trying to make a dashboard for them (net revenue, gross revenue, refunds, etc)

brisk berry
dusky mulch
#

If you're using destination charges you don't create refunds on the connected account. The Charge you want to refund exists on your platform account, so the refund happens on your platform account.

brisk berry
#

If i wanted to create refunds on the connected account I would have to use direct charges?

dusky mulch
#

You're using Express accounts, so you should not be using direct charges.

#

Let's back up.

#

Why do you want to create refunds on connected accounts when there are no charges there to refund?

#

Or, better yet, can you point me to a test mode payment you want to refund?

#

It would probably work out better if we have a concrete example to look at.

brisk berry
#

The way I can simplify my idea is by calling it an ecommerce store. Some users can connect their stripe account and create a stripe product. Users (ones who did not connect their stripe account) can purchase that product with a stripe checkout session. However, I want the users who connected their stripe account (online store owners on my site) to be able to refund their customers.

dusky mulch
#

So the "users who connected their stripe account" are the ones with the Express accounts?

brisk berry
#

yes

dusky mulch
#

Okay, so you need to build a UI for those folks that lets them initiate a refund for the Charges that exist on your platform which are associated with their connected account.

brisk berry
#

I have a UI. The UI consists of everyone who had a successful checkout, and next to their names is a refund button. The refund buttons executes the code i attached earlier

dusky mulch
#

Okay, that makes sense, except I don't understand why you're trying to list refunds on the connected account? Does that code do what you expect?

brisk berry
#

No, the refunds appears as a list of length 0

grim grailBOT
brisk berry
#

I was expecting the code to list all the refund objects that the connected account (express acount) has created

dusky mulch
#

There are no refunds on the connected account though, that's the key to understanding this.

#

You're refunding the charge on your platform account.

#

That's where the charge lives. That's also where the refund lives.

#

If you want to list refunds you need to list the ones on your platform account. Don't specify stripeAccount.

#

To put it another way, when you created the refund you didn't specify stripeAccount, which means the request happened on your platform account, so why are you specifying stripeAccount when listing refunds?

brisk berry
#

If I specify stripeAccount when creating the refund and listing it, will that work?

dusky mulch
#

That's worse.

brisk berry
#

oh god

dusky mulch
#

First of all, you can't specify stripeAccount where you specified it when creating the refund.

#

Second, there is nothing on that connected account to refund. The Payment Intent exists on your platform account, not on the connected account.

brisk berry
#

So is there a way to make the payment intent exist on the connected account?

dusky mulch
#

No. You don't want to do do that. That would be bad.

#

That would require you to switch to direct charges, and direct charges should not be used with Express accounts.

brisk berry
#

Ok so the payment intents should exist on the platform account, which is also where the refunds exist.

dusky mulch
#

Yep.

brisk berry
#

But, if i list all refunds on the platform account, wont that take all refunds across every express acount

#

I only want the refunds for a specific account

dusky mulch
#

Yes, unless you filter them in some way.

#

Do you want to list all refunds related to the connected account at this point?

#

Or just one?

brisk berry
#

All refunds related to the connected account

dusky mulch
#

(I should not have said "on the connected account" there and edited it; the refunds are on your platform, but some of them are related to your connected accounts. Edited the above to clarify that.)

#

If you want to do that you'll need to list all refunds on your platform account and then filter the ones that aren't related to the connected account out.

#

You can do that in several ways; you can store payment and/or refund info in your database with a relationship to the connected accounts and determine relationships that way, or you could specify the connected account in the Refund's metadata when you create them: https://stripe.com/docs/api/refunds/create#create_refund-metadata

brisk berry
#

Got it. This is making more sense. The last problem though is if I filter in the code, that doesnt solve the problem that the express account owners do not see their refunds in their stripe dashboard.

#

All the payments they see will be succeeded

dusky mulch
#

Yep. Express accounts are not typically aware of or responsible for refunds, the platform is.

#

If you want them to be aware of them and have visibility into them you need to build all of that UI and logic yourself to make that happen.

#

Taking a big step back, I do wonder if Express accounts are the correct choice for your use case. Did you investigate using Standard accounts?

brisk berry
#

To be honest, I was confused by the difference

dusky mulch
brisk berry
#

Yes

#

It seems that standard accounts just have more control maybe?

dusky mulch
#

With Standard accounts your connected account holders have access to the full Stripe dashboard. You also use direct charges with them, where the Payment Intents, Charges, and Refunds all live on the connected accounts. That means those account holders can go into their Stripe Dashboard and see all of that information. They can issue refunds right from the Dashboard themselves, see the results, etc.

brisk berry
#

Standard accounts are definitely what I wanted

#

Is that a very hard switch?

dusky mulch
#

It depends on how far along you are and how your integration works. Hopefully it won't be too difficult.

brisk berry
#

Can i just change the type parameter

dusky mulch
#

Then you should be able to start modifying you code to move from Express accounts with destination charges to Standard accounts with direct charges.

brisk berry
#

Thank you

dusky mulch
#

Happy to help!

brisk berry
#

However one quick thing with the charges

#

I never actually created a charge

#

i created a product

dusky mulch
#

Payment Intents create Charges.

#

And Checkout creates Payment Intents.

brisk berry
#

and when a user has a successful checkout session for a product is that a payment intent

dusky mulch
brisk berry
#

Ok i will

dusky mulch
#

Yep, basically.

brisk berry
#

Perfec

#

thank you for the help

dusky mulch
#

The video will help clarify it.

brisk berry
#

sorry that this took a while