The last couple restaurants I’ve visited used Toast for payments, and this is what QR codes were meant for. The receipt has a QR code specific to your order, on iOS it opens an App Clip, and you can pay with Apple Pay.
Great experience, especially compared to the old way. Waiting for the server to pick up and return your credit card is the worst.