text: how does a credit card work? like when we swipe the card how where the info goes? and how do it know that i got credit? there are thousands of firms that issues credit cards , how on earth the swiping machine knows about the credit/ the merchant's machine authenticates the account with the financial institution that issued the card. basically this is checking to see that the card number is valid, and the card itself is valid.  swiping the card sends the card information, and transaction information to the financial institution. the financial institution returns a numerical code. the code can either be approved, or a trouble code that denies the transaction. if the transaction is denied with a trouble code, the specific code maps to an english definition for the denial of credit. for example, "credit limit exceeded", "card not activated", or "not a valid account".  the first four-six digits of the account number refer to a specific financial institution, which is a destination for the machine. for example, 5424 is issued by citibank.