#pbpyrojust

1 messages · Page 1 of 1 (latest)

covert trellisBOT
austere apex
#

I believe fetch() in this case needs to point to everything including what would come after http://localhost:4242. So, you would point fetch() to http://localhost:4242/connection_token

vague tiger
#

That is what I am doing...

#

Terminal does spit out ReferenceError: Cannot access 'token' before initialization

#

Could it be this in server.js? app.post('/connection_token', async (req, res) => { const token = // ... Fetch or create the ConnectionToken res.json({secret: token.secret}); });

#

Does a connection token need to be hard coded?

#

I thought it is supposed to fetch one from Stripe with the fetchConnectionToken function

austere apex
vague tiger
#

That was it await stripe.terminal.connectionTokens.create();

#

I knew I was missing something. Thanks so much!

#

Good to go Connected to reader: Reader Simulator