Amazon has added two phones to its Prime Exclusive Phones program in the US - the Motorola Moto G5 Plus and the Alcatel A30. Paid Amazon Prime members can get the Alcatel A30 for $59.99 (down from $99.99) and the Moto G5 Plus for $184.99 (down from $229.99).
If you're unfamiliar with the Prime Exclusive Phones program here's the rundown. Amazon will sell you a phone at a subsidized price if you're an Amazon Prime subscriber. In return you'll get Amazon and seller ads and offers on your lockscreen, in your notification area and you'll have some preinstalled Amazon apps.
Amazon does the same thing with its Kindle e-book readers, offering a cheaper Kindle with Special Offers - read ads - and a regular one without, for a higher price. As with the Kindle you can always opt to pay the difference and remove the ads.
If you go into your amazon settings, pay the difference to have the ads removed, then you can flash stock firmware as well as other roms.
You can't flash stock ROM to remove ads. Starting with the Amazon Moto G4 Play, trying to flash non-Amazon images results in errors. See XDA Dev for Moto G4 Play (not G4/G4+).
I will flash the stock rom from recovery mode