depends on what site, how you collect payments etc, if you use 3rd party payment processor that redirects for payment to their iframe, i dont think you can collect them, but if you process ccs by your site then its possible
It's no longer possible to do this if you're posting the data to another processor (Stripe, etc) due to browser security. You need to put in a fake form then redirect them to the authentic form right after.