You could also look at the new W3 Payment Request API [1] that stores card details securely in modern browsers.
Stripe has a Payment Request Button that enables one-click buying with Apple Pay, Google Pay, or the Payment Request API.
[2] The button will choose whichever method is best and available for your specific browser.