You can do this, but you need a way to transform your credit card data into something Mendix can handle: xml, ws or something with java.
Keep in mind that a credit card reader is often a local device with particular security requirements. If you uses credit card readers with a web application (like Mendix), be sure that the data send over internet is protected. HTTPS with SSL certificate is a minimum.
Surely a credit card reader or a scanner is just another input device like a keyboard. All you need to do is make sure the focus is on the correct field when you swipe the card and the output from the reader will be placed in that field.
So, create a form with a single field and open it as blocking dialog, swipe, then click OK button to accept data with a simple microflow to place it in the correct form field.
But I don't have a credit card reader to test this theory !! Hope it works