#CalebR-dispute-webhook

1 messages ยท Page 1 of 1 (latest)

silver ember
#

Hi ๐Ÿ‘‹ do you have the event ID or dispute ID that you can share?

haughty comet
#

Yes, du_1LAAf1ESRuzkqMtUtGkD1qBj

silver ember
#

Thank you, pulling that up and taking a closer look.

#

And what is your account ID?

haughty comet
#

Our platform account id is acct_0JMW53soKKKIrdr2RkEc

silver ember
#

Ah, I was suspecting that you might be the platform in this scenario. When you attempted to retrieve the dispute, did you use the stripe_account parameter to make the request as your connected account?
https://stripe.com/docs/api/connected_accounts

We don't allow accounts to access objects from a different account, so if you want to retrieve an object like a Dispute that resides on a connected account, then you have to make that request as the connected account.

haughty comet
#

Ah, okay, that might be the issue. Let me check.

#

Hmm, still getting a 404 with the account parameter:

dispute = Stripe::Dispute.retrieve({
id: 'du_1LAAf1ESRuzkqMtUtGkD1qBj',
expand: ['charge'],
}, account_id: 'acct_1DoGjjESRuzkqMtU')

> Stripe::InvalidRequestError ((Status 404) (Request req_po0MfPdRjN5H6b) No such dispute: 'du_1LAAf1ESRuzkqMtUtGkD1qBj')
silver ember
#

That request doesn't appear to be made as a request for your connected account. Looking at your snippet it looks like you're trying to use account_id instead of stripe_account and aren't putting it in a hash as shown in our example snippet:
https://stripe.com/docs/api/connected_accounts?lang=ruby

haughty comet
#

Oh, sorry, I was going off of memory for a different request type. That worked. Thanks for your help!

silver ember
#

Any time, happy to help.