Buying #cannabis online or with a credit card will *probably* not get you barred from entering the US, but it's still probably best to pay cash at a brick-and-mortar store if it's an option in your area and you plan on traveling to the US in the near future.
https://business.financialpost.com/cannabis/protection-of-cannabis-data-raises-privacy-questions