#CalebR-dispute-webhook
1 messages ยท Page 1 of 1 (latest)
Yes, du_1LAAf1ESRuzkqMtUtGkD1qBj
Our platform account id is acct_0JMW53soKKKIrdr2RkEc
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.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
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')
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
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Oh, sorry, I was going off of memory for a different request type. That worked. Thanks for your help!
Any time, happy to help.