If you have a USB card reader, you can swipe a credit card to process a payment in QuickBooks Online.
To know how to get a credit card reader that's compatible with QuickBooks Online, see  Order an Intuit Payment Solutions Magtek Card Reader.

To swipe a credit card:

Ensure the card reader is plugged into your computer.
  1. Choose Plus (+) > Receive Payment (if receiving payment toward an invoice) or Plus (+) > Sales Receipt (for payment at the time of sale).
  2. Fill out the payment details on the sales receipt or receive payment screen.
  3. Select the Enter credit card details box.
  4. Select the Process payment when saving checkbox.
  5. Choose Swipe Card and swipe the card through the reader as shown in the picture onscreen.
  6. Select Save.

Troubleshooting swiping cards

These suggestion may help you resolve issues with swiping cards.

Test the card reader connection

Double-check that the card reader is firmly connected to your computer via the USB port, and that your computer is on. Be sure the reader is ready before you swipe the card. When the light on the card reader is green, it's ready to accept a card.

Ensure you are using a compatible card reader

Only devices purchased from Intuit are fully supported. Ensure that your card reader is a MagTek USB device.

Use a direct USB connection

Plug the reader directly into one of your computer's USB ports, not through a keyboard or a USB hub. Switch ports and restart the computer, if needed.

Swipe the card correctly

Face the card's magnetic stripe towards the light. Swipe the card once from either end.

Check the card's magnetic stripe

If the card can't be read, its magnetic stripe may be damaged. Check the strip for any residue and wipe it off.

Check the card reader

If the light is red, it means the reader didn't read the card correctly. If this happens a lot, the magnetic head may need cleaning. You can purchase cleaning cards at office supply stores. If the card reader beeps or blinks, or if card data seems incomplete or garbled onscreen, the card reader may be damaged or improperly configured. Contact the manufacturer.

Try a different card or computer

Try different types of cards to see if the card itself or the card type is causing the issue. You can also try using the card reader and swiping the card on another computer. A computer's security setting could be blocking the reader from working properly.

Switch from HID to keyboard mode

If the card reader is unresponsive, try switching from HID (human interface device) to keyboard emulation mode. For MagTek readers, go to  MagTek website to toggle easily between the two modes with your reader plugged in. If you have a different card reader, search the manufacturer site for information about switching modes.

If a card can't be swiped

If you still can't swipe a card after following the troubleshooting recommendations, enter the card information manually so you don't lose the sale or payment. The rate for the keyed transaction will be higher.