#devil_code

1 messages ยท Page 1 of 1 (latest)

native reefBOT
#

๐Ÿ‘‹ 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/1266319584039014462

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

clear relicBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

open apex
#

Hello, not sure if this is a "code" question/help

#

I retrieve a charge with:

        String(dispute.charge),
        {},
        { stripeAccount: stripeAccountId }
      )
#

the dispute comes from a webhook event, which comes alr

#

not sure if the customers.retrieve part is good though

formal briar
#

๐Ÿ‘‹ happy to help

open apex
#

๐Ÿ‘‹ , it might even be the stripe.charges request

formal briar
#

the error means that process.env.STRIPE_SECRET_KEY is an empty string

open apex
#

so we're sure that this code:

        String(dispute.charge),
        {},
        { stripeAccount: stripeAccountId }
      )```
#

wouldnt do it?

formal briar
#

I'm not sure what you're trying to do to be honest, but first you need to fix the bigger issue which is the API authentication

open apex
#

i have bunch of methods in the webhook event, and the "requests" are throwing, and was not sure where, checking NR logs, it was thrown this.

#

Is the API auth related to the process.env.STRIPE_SECRET_KEY?

formal briar
#

yes

#

stripe = new Stripe(process.env.STRIPE_SECRET_KEY as string, {
apiVersion: '2023-10-16',
})
this line initiates the stripe instance

#

i'm also not sure why you're using this.stripe

#

instead of stripe

open apex
#

its nestjs

#

i'll have a check with team if they changed the key

formal briar
#

oh and btw it's not stripe= new Stripe('....') it's stripe = Stripe('.....')