The agreement requires the e-commerce giant to give money back to customers and change its subscription practices.