#B33fb0n3

1 messages · Page 1 of 1 (latest)

obsidian burrowBOT
west quest
#

What error are you getting here? I can check if something is going on

#

Do you have a request ID from a request that failed this way? (req_123)

random sierra
random sierra
alpine crown
#

👋 stepping in as Pompey needs to step away

#

Taking a look

random sierra
#

ah ok

alpine crown
#

Hmm you are using Node SDK + typescript?

random sierra
#

I just use nodejs, but not typescript

alpine crown
#

Hmm interesting

#

Can you show me how you are initializing Stripe?

random sierra
#

Sure. It's initializied like that in the backend:
const stripe = require('stripe')(getStripeKey);

#

My code that will be executed look like this:

paymentIntent = await stripe.paymentIntents.create({
      amount: (totalPrice * 100),
      currency: 'eur',
      automatic_payment_methods: {
        enabled: true,
      },
    });
alpine crown
#

Have you logged out getStripeKey?

random sierra
#

no

alpine crown
#

And ensure you can reach Stripe

random sierra
#

give me a second, I try to see my secret key...

random sierra
alpine crown
#

Hmm nothing changed on our end with authentication that I'm aware of.

#

Has anything on your server changed recently?

random sierra
alpine crown
#

I think you are going to have to debug on your end why your server can't reach Stripe. It does seem like you have the right key because otherwise I would expect a different error. But, something is preventing the outbound request to Stripe it seems.

random sierra
#

what could it be? It's the first line of the backend code 😅

alpine crown
#

It likely isn't your code. It is likely something with your server config

#

Have you tested trying to hit the API locally with this code?

#

(in testmode)

random sierra
#

oh ok... I haven't yet

alpine crown
#

That would be a good next step

random sierra
#

I've never done that, how does that work?

alpine crown
#

Are you a developer?

#

I can't really walk you through spinning up a local server

#

But you would mostly just use an Express server and run it locally

#

We have a lot of code examples in our docs that do this

random sierra
alpine crown
#

Okay then you are running locally then?

#

So if you run this code in testmode from your local server then do you hit the same issue? I assumed the original issue was reported from a production environment?

random sierra
alpine crown
#

Right, that is your local server

random sierra
alpine crown
#

Sorry, what I mean is you are accessing your AWS server locally here

#

So yeah, if you want to rule out the code being the issue, you could create a simple project with an Express server hosted locally like we show in our code snippets for Node

#

That would indicate that something is blocking your AWS requests to Stripe, as it can't actually form a connection using that Server

random sierra
alpine crown
#

I don't mean actually physically accessing them. I mean the configuration for how they are set up to run

random sierra
alpine crown
#

Yes

#

I haven't heard of any one else

#

Have you tried accessing any other APIs using your AWS server?

random sierra
alpine crown
#

Right, something about how your server was configured/set up is likely the issue

random sierra
random sierra
alpine crown
#

Well people have issues with their Server configs all the time

#

But I'm saying this isn't a Stripe issue specifically. I haven't heard of many other folks reporting the same thing you are which could indicate something broke on our side

random sierra
#

hm ok. I gonna check this tomorrow. I can just reply in this chat, right?

alpine crown
#

We don't cover this channel on weekends, but you can post in the main channel on Monday and someone may be around to help (coverage will be low next week due to holidays)

random sierra
#

ok, thanks for your help!