To start there's a difference between Retail companies and Ecommerce companies.
Retail rates are given to companies with a physical location that physically swipe cards. They get the lowest rate possible because the risk of fraud is significantly less. Ecommerce rates are for companies that do business online and run their transactions through a website or payment gateway.
Standard merchant account providers (not Paypal, Stripe etc) would give a large retailer interchange plus pricing. Interchange is the cost associated with the transaction and is dependent upon several factors including the type of card used and the method that the card was accepted (Swiped vs Key Entered). Each transaction can fall into one of hundreds of interchange cost "buckets". Interchange plus pricing is the cost plus a small markup for the merchant account provider.
Below are some examples of interchange plus pricing. This doesn't include additional dues, fees or assessments.
RETAIL / SWIPED ACCOUNTS
KEY ENTERED / INTERNET ACCOUNTS
Amazon likely has a direct relationship with a bank considering they also offer Amazon Payment services. Any pricing they receive is not representative of what other large retailers would receive. Walmart also likely has a special relationship with a bank.