#brent_connect-refund
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/1420833768633139371
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
@exotic sonnet I'm assuming you are using Destination Charges is that correct?
brent_connect-refund
yes
Okay and I assume you are setting the metadata on Refund creation and doing nothing else is that correct?
Basically: when you use Destination Charges, there are many objects involved both on the platform (your account) and the connected account. Each of those objects have their own logic and metadata. When you set metadata on Refund creation it's only reflected on your own platform account's Refund and not on the object on the connected account
It's the same for the payment itself, the PaymentIntent and Charge in your platform has the metadata and the connected account's Charge as the result of the Transfer moving money in their Stripe account's balance doesn't
on a payment_intent.succeeded event i am updating the payment object with metadata (which shows on the export) and then on a refund.created event I am updating the refund object with the same metadata and this does not show on a payment_refund row in the export file.
what do i need to do to get that metadata to show up on the export file?
Can you give me a concrete example object id to look at?
re_3SBHYVAmWM7mv4O61aNO7qhe is a refund object that I set metadata on. Here is a payment py_1SBIM1PNfIDqLgOkDtLSYmHh that I refunded and also set the metadata on the refund
Okay so that's the Refund on the Platform right? Where did you update the Refund on the connected account? It would be pyr_12345
I didn't i just consumed the refund.created event and it gave me that refund id and then called the update refund api. How can I access the pyr object?
Yeah sorry that's what I want explaining earlier about how there are many different objects involved. You replied saying you already update those but I don't think you do
Have you seen https://docs.stripe.com/connect/destination-charges?platform=web&ui=stripe-hosted#flow-of-funds-app-fee before? It shows all the objects (before the Refund)
Refunds work the same, the Refund on the platform (re_123) points to a TransferReversal (trr_123) on the platform that pulls funds from the connected account via the transfer_reversal property and that one points to the Refund on the connected account (py_123) via the destination_payment_refund property
Conceptually though doing the data export manually in the Dashboard is not the best approach/idea so I wonder if there's a better flow for you
I am setting metadata on the payment object (py_123) and the refund object (re_123).
How can I resolve get to the proper refund pyr_123 from the transferreversal. I have access to the trr_123 id on the refund.created event. Is there an api I can call to get this information
It's not me that is pulling the export it is the connect account
they have asked about providing that metadata in the export
as right now it's not showing for payment_refund rows only payment rows
I mean it's not, the connected account doesn't have Dashboard access at all right? You are doing this by hand in the Dashboard which is not a normal flow
Sorry what part of what I said earlier is unclear? Are you the developer building this?
I am literally viewing the dashboard as the connected account and pulling the export
yes I am the developer
Okay so you are pulling this, not the connected account. And they have no way to pull this at all
Usually we recommend building your own logic for data exports. Or use one of the Connect Embedded components for it https://docs.stripe.com/connect/supported-embedded-components/payments which supports Destination Charges and exports
oh man. I am testing in test mode right now. I go to the connected account I click on view dashboard as <connected account name> I click on ttransactions export and the metadata for a payment_refund does not show in the export
But really as the developer, when you create the Refund you should be passing metadata, not sure why you do this on the refund.created Event in the first place
and then you need to understand there are related objects (what I explained above) and go and update that.
So when you create that Refund, it has transfer_reversal: 'trr_123' and then you can use the Retrieve TransferReversal API to retrieve it and find the destination_payment_refund: 'pyr_123' and then call the Update Refund API with that connected account id in the Stripe-Account header and pass the metadata
the metatdata shows for payment rows though
I don't really appreciate you're condescending tone.
Hi there,
taking over for my colleague who had to step away. Give me just a second to catch up.
Sorry, I wasn't trying to be condescending, I'm trying to focus on how the API layer part itself works to show you the different pieces involved
I looked at the Charge id you shared that has metadata and that one is the one on the connected account (the one on the right in the picture from our doc) and it looks like your code explicitly updated it to set metadata.
Does that align with what you see in your code?
I'm good, I'll figure it out on my own