#doowire
1 messages · Page 1 of 1 (latest)
Hello! We don't typically reopen closed threads, but you can ask new questions here!
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
Okay. Sounds like this is more of a feature request than a question?
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
There's no way to alter the behavior of the Stripe Dashboard with code.
Are you using direct or destination charges? Sounds like direct?
Direct charges
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.
Is there a place in the connected account dashboard where I can find refunded direct charges
I believe they would show up if you view the Dashboard as the connected account.
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
Even when viewing the Dashboard as the connected account?
Is there a way to test run this
Yeah, you can do all of this in test mode.
Just to clarify, I'm talking about this:
Are you using that option?
Just tried it. Yup, all the payments are still succeeded
Can you give me the connected account's ID that you're looking at?
acct_1NIMVMQ161OctuFo
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.
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.
There are several failed attempts to create Refunds, but none I'm seeing that succeeded.
Where do you see the failed attempts?
In the request logs for this account.
After you view the Dashboard as this account go to Developers > Logs.
In test mode.
I see those failed attempts. Not sure if that was past buggy code though
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.
More details here: https://stripe.com/docs/connect/charges#direct
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?
Each Stripe Connect account I am trying to make a dashboard for them (net revenue, gross revenue, refunds, etc)
How can I create a refund on a Connected Account instead of my Platform Account
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.
If i wanted to create refunds on the connected account I would have to use direct charges?
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.
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.
So the "users who connected their stripe account" are the ones with the Express accounts?
yes
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.
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
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?
No, the refunds appears as a list of length 0
I was expecting the code to list all the refund objects that the connected account (express acount) has created
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?
That's worse.
oh god
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.
So is there a way to make the payment intent exist on the connected account?
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.
Ok so the payment intents should exist on the platform account, which is also where the refunds exist.
Yep.
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
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?
All refunds related to the connected account
(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
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
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?
To be honest, I was confused by the difference
Did you come across this page? https://stripe.com/docs/connect/accounts
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.
It depends on how far along you are and how your integration works. Hopefully it won't be too difficult.
Can i just change the type parameter
I recommend you read this page from top to bottom to understand the different charge types: https://stripe.com/docs/connect/charges
Then read this top to bottom: https://stripe.com/docs/connect/direct-charges
Then you should be able to start modifying you code to move from Express accounts with destination charges to Standard accounts with direct charges.
Oh, this page too: https://stripe.com/docs/connect/standard-accounts
Thank you
Happy to help!
However one quick thing with the charges
I never actually created a charge
i created a product
and when a user has a successful checkout session for a product is that a payment intent
Have a look at the video here: https://stripe.com/docs/payments/tour#payment-objects
Ok i will
is this correct tho
Yep, basically.
The video will help clarify it.
sorry that this took a while