To test in Stripe, you need to use your test API keys when doing things like creating a PaymentIntent - it looks like you are using your live mode keys here.
Here are their docs on testing: https://docs.stripe.com/testing-use-cases#test-mode