#devil_api

1 messages ยท Page 1 of 1 (latest)

tacit steppeBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1260922509105172520

๐Ÿ“ Have more to share? Add details, code, screenshots, videos, etc. below.

misty spoke
#

i basically have this:

  const charge = await this.stripe.charges.retrieve(
    String(dispute.charge)
#

on some webhook

#

get thrown: Error: No such charge: 'ch_3PbLFWQHtchOUOrh1DQHtymE'

#

is it intended like this?

quaint cipher
misty spoke
#

dsipute id:
dp_1PbLFXQHtchOUOrhgCPJ60zu

on the dashboard i can see:
ch_3PbLFWQHtchOUOrh1DQHtymE

#

yeah 1 sec

quaint cipher
#

I suspect you're missing the Stripe-Account header from your charges.retrieve call

#

It's a direct charge/dispute on the connected account, so if this is the platform's API key the resource missing error is right

misty spoke
#

i have the api key set though

quaint cipher
#

Yes, the platform API key. Those objects don't exist on the platform account โ€“ they exist on the conncted account

misty spoke
#

AHA

quaint cipher
#

So you need to 'authenticate' as the conncted account

misty spoke
#

okay okay

#

how would I go on

#

about retrieving

#

stripe.charges.retrieve(<ID>, { stripeAccount: <ACCOINT_ID>) ?

#

i cant initiate stripe with the account id

quaint cipher
#
stripe.charges.retrieve('ch_xxx', {}, {stripeAccount: 'acct_'})
misty spoke
#

it worked, thank you