security – Stripe integration with Vue/Nuxt frontend and Symfony backend

I am integrating payments in my application using Stripe. My application is comprised of a Nuxt.js frontend (SSR) and a Symfony 5 backend (API). My main use cases are:

  • Save credit card upon user Registration
  • Make payment when purchasing an order.

I have successfully setup Stripe’s Elements using Nuxt’s stripe module. The recommended approach seems to be to generate a token with the form data (credit card number etc) and send this token to my backend to create a new payment method.
However, I cannot find specific documentation about generating Payment Methods using this kind of tokens, and I don’t think sending the raw form data is a good idea. As payments always deal with delicate data, I am afraid to be misunderstanding Stripe’s recommendations.