Is there a way = Yes. But it is not out of the box or simple, and may also vary based on the payment gateway used etc and security considerations (both of your customers info/data, and those imposed by the payment gateway), and actual functionality you need.