I am having trouble connecting to the Stripe checkout API in my MEAN stack project

57 Views Asked by At

enter image description here

This is the error I am getting in the dev tools

enter image description here

This is the error in the backend terminal.

https://stripe.com/docs/checkout/quickstart

here is the Stripe docs which is what I was following

https://github.com/nathanmalone99/Game-app

Github Link

P.S. Please do not try and do anything to this repo as I am using this for a college project and my lecturer alreasdy dislikes me lol

I tried to change the layout of the checkout.js file to suit the Stripe docs but I cannot see what is wrong for the life of me

1

There are 1 best solutions below

1
codename_duchess On

That error message indicates that you're not passing line_items. You can go to the request log in your Stripe Dashboard to see exactly what you're sending Stripe in the request body. Then, based off that, you'll need to add a debugger or some print statements to your code to figure out why no line_items are being passed.