Similarly how you can use Apple Pay to call an Uber/Lyft in-app.
That said, Apple Pay is just a layer between you and the user's credit card - there's no functional difference at the transaction layer between accepting Apple Pay and having a credit card form in your App. This is why Stripe/Paypal et al. all 'support' Apple Pay. You still need a payment processor who can take the Apple Pay token and turn it into a transaction that puts money into your account.
The in-app-purchase API, however, directly charge's the user's credit card on file with Apple and is credited to your developer account as a payment.
TL;DR Apple Pay is a layer between customer and payment processor, IAPs are a layer between customer and merchant. Apple takes 30% of IAP. Payment processors of Apple Pay take a cut before passing payment on to merchant (Stripe is 2.9% + 30c/transaction, for instance).
Somewhat related: It doesn't seem to be the case anymore but I have the distinct recollection of paying for Hulu through the iPad app as an IAP at a subscription price of $13.99/month only to discover Hulu was charging $11.99/month if purchased through their site. I think Apple cracked down on folks with different IAP pricing vs. direct subscription pricing, but for a while it was a very frustrating effect of the 30% cut that you're forced to give to Apple if you want to allow any in-app subscription on an Apple device.
Edit: I was right, they just recently dropped it when they rolled out their redesign
https://www.macrumors.com/2017/12/21/hulu-apple-itunes-billi...