You can buy a lottery ticket if you are a non-U.S. citizen or a U.S. citizen staying outside the United States. But to make a legal purchase, you must be present in the United States to buy your tickets. It is illegal to buy or sell lottery tickets online.