#tallmanpapi

1 messages · Page 1 of 1 (latest)

lilac hazelBOT
nimble moat
#

Hi, sorry is it related to Stripe API?

zinc pawn
#

Yes, its using the Stripe API.

#

But its always return a 504 error code when I want to use your checkout component for my web-app.

nimble moat
#

Do you observe a redirection happen in browser?

zinc pawn
#

I do get redirected to /api/stripe/checkout, I just don't observe the created checkout session in the stripe dashboard.. So that means it's somewhere going wrong in sending "server-side", I think.

#

let me check the logs to be sure

#

hmm, nope.

nimble moat
#

So no request has been made?

#

On the same account, test mode?

zinc pawn
#

Yes, same account.

#

No request in the logs.

#

Immediate 405 it throws

nimble moat
#

If you insert some log after lineItems and before the call to stripe.checkout.sessions.create, would you see it?

zinc pawn
#

Ooh, thats a good one, I always forget to do those tricks, sorry.

#

Let me see!

#

ooh, I think I found something useful @nimble moat , It only logs outside the

export async function handler(req: NextApiRequest, res: NextApiResponse) {
#

So that means the function is being called.

nimble moat
#

Only log outside, means the function is not being called?

zinc pawn
#

Yes, exactly. Do you know why, do I have to specify that in a onClick in the button tag or?

nimble moat
#

Sorry not very familiar xD I guess this is more of how to call a function to serve your server request

#

before touching Stripe API or any API

zinc pawn
#

Yes, no problem, while talking to you about this, I solved it hahaha

#

Thank you so much though!! I got a different problem, but now I am atleast in the function, so I know its starting to work:)

#

Thank you, have a nice day.