#just4skiillz

1 messages ยท Page 1 of 1 (latest)

jade echoBOT
#

Hello! We'll be with you shortly. 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.

near tusk
#

What do you mean by can't find it?
Can you elaborate?

brisk torrent
#

yes...so I made the code based on the doc..:

#

on postman im getting this:

#

its not about connexion because all my toher request is working

jade echoBOT
brisk torrent
#

and my dashboard...

leaden bloom
#

๐Ÿ‘‹ stepping in as Hanzo needs to step away

#

Can you share the request ID for the failure when you attempt to retrieve?

brisk torrent
#

what do you mean by the request Id?

#

do you mean the payment intent id?

leaden bloom
#

It should also be provided with the error you see in the response in your terminal

brisk torrent
#

in the logs i just have post that i made earlier no get...

leaden bloom
#

Did you filter to show GET requests?

#

It only shows POST requests by default

#

If you don't see it at all then there is a good chance you are mixing up your keys and trying to retrieve from the wrong account

brisk torrent
#

but my keys are setup in the backend im in a mobile app development

#

like :
const stripe = Stripe(process.env.STRIPE_SECRET_KEY);

leaden bloom
#

Do you see an erroring request in those logs?

brisk torrent
#

no

#

like i dont even get a 200, 404, or 500 answer im getting nothing

leaden bloom
#

What do you mean you "get nothing"?

#

You'll need to be more specific

#

Where are you looking?

brisk torrent
#

i mean you know im suppose to get an answer from my request:
app.get("pmtIntent", async (req, res) => {
//const { pmtIntentId } = req.params;
try {
const paymentIntent = await stripe.paymentIntents.retrieve(
"pi_3OKo0qFi2mBuKZJZ1P1pjMfQ"
);
res.json({ paymentIntent });
} catch (error) {
console.error(error);
res.status(500).send("Internal Server Error");
}
});

leaden bloom
#

What happens if you add a log after calling const paymentIntent = await stripe.paymentIntents.retrieve( "pi_3OKo0qFi2mBuKZJZ1P1pjMfQ" );

#

Like const paymentIntent = await stripe.paymentIntents.retrieve( "pi_3OKo0qFi2mBuKZJZ1P1pjMfQ" ); console.log("pi: ", paymentIntent);

brisk torrent
#

its weird i get nothing:
Stripe server running on port 4000
[nodemon] restarting due to changes...
[nodemon] starting node index.js
Stripe server running on port 4000
[nodemon] restarting due to changes...
[nodemon] starting node index.js
Stripe server running on port 4000

#

its like my url he doesnt understand im so lost right now lol

leaden bloom
#

Sounds like you aren't hitting that endpoint at all

#

If you add a log immediately after app.get("pmtIntent", async (req, res) => { do you see it fire?

brisk torrent
#

no nothing but its weird because that command is working:
app.get("/customer/:email", async (req, res) => {
const { email } = req.params;
try {
const customer = await stripe.customers.list({
email: email,
limit: 1,
});
res.json({ customer });
} catch (error) {
console.error(error);
res.status(500).send("Internal Server Error");
}
});
why not the other one i dont get it

leaden bloom
#

Can't tell you that. It has to do with your server set up and that's not really something I can help you with.

brisk torrent
#

ok thank you for trying to help ill try to understand

leaden bloom
#

Yeah I'd back up and ignore the Stripe stuff and just get the endpoint working

#

Then add back in the Stripe stuff ๐Ÿ™‚

#

If you run into issues once the endpoint is working then let us know!

brisk torrent
#

ok\

#

lolol i found the error

#

its always the most stupid one lol,
look my request:
app.get("pmtIntent", async (req, res) => {
//const { pmtIntentId } = req.params;
try {
const paymentIntent = await stripe.paymentIntents.retrieve(
"pi_3OKo0qFi2mBuKZJZ1P1pjMfQ"
);
res.json({ paymentIntent });
} catch (error) {
console.error(error);
res.status(500).send("Internal Server Error");
}
}); no / in front of pmtIntent

leaden bloom
#

Ah yeah that'll happen