#localpath_error
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/1346291772103462933
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hello! gimme a second to look
Yep np. The way our integration got built for Bank charges with Connected Accounts has really caused us some issues unfortunately
so this is the request : https://dashboard.stripe.com/test/logs/req_lzSfMjQxuOeixf, and it says
No such charge: 'py_1QuwHZIbTgtNSoQpVxj9p3M3'; a similar object exists in live mode, but a test mode key was used to make this request.
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
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
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
if you make the request via a normal API request (not with the CLI), does it work?
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
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
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 }
);
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
Yea I've ensured I'm using the CLI in live mode and I can retreive livemode objects no problem
okay, sorry, but I'm a bit confused now
this is a balance txn in Livemode as an example
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
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
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
that's good then
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?
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
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
hmmmm, like what you say, you're not listening for any of the refund webhooks right now in your Connect type webhooks
i think at a start, you would want to try listening to
https://docs.stripe.com/api/events/types#event_types-refund.created
https://docs.stripe.com/api/events/types#event_types-refund.failed
https://docs.stripe.com/api/events/types#event_types-refund.updated
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?
yepyep
Why do they do the charges with the py_ prefix?
if it's not a card payment, it will be py_
Oh ok I didn't realize that
I wonder how these bank charges are being scoped into our Connected Account
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
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