In most restaurants you would ask for the bill, then when you pay, you will receive a separate receipt.
The receipt is proof of payment.
Reply on news.ycombinator.com