Buying marijuana for recreational use now is legal in Colorado—and paying for it with plastic is getting easier.

The official rules of Visa Inc. and MasterCard Inc. prohibit the use of their debit and credit cards for marijuana purchases, but some Colorado merchants are allowing customers to use them anyway.

That is because the card giants,...