Stripe Setup a token from api
I am new to stripe payments. From some reading, I got that it is a good idea to use the payment intent API. But this depends on UI. How do I go about writing an api that takes card info, calls stripe to get a token(is this is setup intent) and uses that to collect payment.