The Lottery announced the news on Tuesday and said the "Play at the Pump" facility should be available by September.
Purchasing tickets will be easy. Players will only need to swipe their driver's license, along with their debit or credit card, and their numbers will be printed on their fuel receipt. Players can also choose to have their numbers sent to them by text message.
California Lottery spokesperson Russ Lopez said: "I think this is going to be, hopefully, revolutionary for us. Seventy-three percent of customers who pump gas don't walk into the retail store, so this is one way of getting their business while they’re pumping gas."