The Square card reader converts the magnetic stripe on a credit card to audio. Using the
getUserMedia() API from WebRTC, it should be possible to get at that audio data (via WebAudio). mslib is a library for decoding this magnetic stripe data (blog posts with more details). It could be incorporate via NaCl. Rhombus is another project that does this (albeit Java-based).
One possible application is in a Chrome extension that implements payment form filling out by swiping a card.