#localpath_error

1 messages ¡ Page 1 of 1 (latest)

solemn lichenBOT
#

👋 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/1346291772103462933

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

humble glacier
#

Here's the balance txn as well

shell crater
#

hello! gimme a second to look

humble glacier
#

Yep np. The way our integration got built for Bank charges with Connected Accounts has really caused us some issues unfortunately

shell crater
#

Is there a reason why are you using the Stripe CLI for livemode? I know it's possible, but it's built more for testing purposes

humble glacier
#

Just bc it's easy to lookup objects. So I can locate the charge no problem, the Refund object isn't understood as far as object ID format by the CLI maybe

shell crater
#

if you make the request via a normal API request (not with the CLI), does it work?

humble glacier
#

To use our production system to do that imperatively will take me a little bit to test. We normally look up Refunds and Charges in the context of our Parent Account bc we're not using Destination Charges, we just do balance transfers to the connected account to fund them for the payment, but in this case these Bank charges made via a payment source made with your Stripe/Plaid integration seem to use some sort of proxy library/Api and it makes the scope of the charge be in the Parent Account but the Refund object either isn't in the Api at all or only exists in the Connected Account

#

I could try passing the Connected Account ID with the Api request so it would be scoped to the child account which makes sense since I can't search for the Refund in the Dashboard from the Parent, I have to go the child account to search

#

There is no object in the UI for the Refund though and the lifecycle of the charge itself is so weird looking bc of it being the py_ type of charge

shell crater
#

The reason why I'm asking you to make the request via the normal API, is because the CLI is using the test key it seems, when the object exists in live mode. You need to ensure it's using the livemode key

humble glacier
#

When attempting to look up the refund I can confirm we do pass the conneccted account ID so I think the Api is a little bugged

const stripeRefund = await this.stripeInstance.refunds.retrieve(
          balanceTransaction.source as string,
          { stripeAccount: nonprofitStripeAccountId }
        );
shell crater
#

try explicitly passing in the livemode secret key using the --api-key flag when making the request using the CLI and see if it works

humble glacier
#

Yea I've ensured I'm using the CLI in live mode and I can retreive livemode objects no problem

shell crater
#

okay, sorry, but I'm a bit confused now

humble glacier
#

this is a balance txn in Livemode as an example

shell crater
#

so you're saying that you tried using the above code snippet you pasted and it doesn't work too? Can you share the corresponding request id [0]? it'd look like req_xxx

[0] https://support.stripe.com/questions/finding-the-id-for-an-api-request

humble glacier
#

We should have made a request today around Mar 3, 2025 5:37:35 AM UTC i'll look to see if i can find it

#

I'll try making an Api request so you can see the request log from it

#

Ahh looks like we're finding it using the SDK/Api ok

shell crater
#

that's good then

humble glacier
#

Issue is we're not receiving the webhooks from the Refund for the Charge, so on our side we don't have the object to update

#

Would you know how we can revieve the webhooks for charge.refunded if the refund is one of the pyr_?

#

Should we enable charge.refunded as a connected account webhook?

shell crater
#

can you paste the request id here if you have it on hand right now? That'll make it easier for me to take a look at the relevant webhooks

humble glacier
#

So i just made this request using the Stripe Api/SDK and I can't find a log for it in the Parent or the Connected Account logs

#

req_P7628kk1uW1zVI

#

aha try that

shell crater
#

hmmmm, like what you say, you're not listening for any of the refund webhooks right now in your Connect type webhooks

humble glacier
#

Right. We normally do all processing into our Parent then transfer funds to the Connected Account but for these Banks tokenized via Plaid it scopes it to the Connected Account possibly right?

shell crater
#

yepyep

humble glacier
#

Why do they do the charges with the py_ prefix?

shell crater
#

if it's not a card payment, it will be py_

humble glacier
#

Oh ok I didn't realize that

#

I wonder how these bank charges are being scoped into our Connected Account

shell crater
#

so if you use the stripeAccount header, you're making the request on-behalf-of the connected account. That means any request / objects will be created on the connected account

humble glacier
#

Right, I'll have to dig back through our code to see why that's happening as charges should always just be direct to our parent. unless its something to do with the Bank Source created via Plaid, and Plaid is scoping something

#

This only seems to happen for Bank charges which is why I bring up Plaid but I didn't build all that code so I'm not 100% sure what's going on.

thanks for the help and the time