Offchain transactions New here, but have some intermediate knowledge of Bitcoin and Blockchain. My question is in regards to the off-chain transactions.

For example, today I paid a coffee shop using my Coinbase wallet. I scanned and paid. The transaction pended for about 5 mins, then was successful. Problem is, the coffee shop didn't receive it. So I had to repay them using cash just to settle it and not give the staff an awkward moment since they didn't know what was going on as well.

I wasn't sure what Bitcoin Client or "App" they were using, but it was on an iPad.

If I paid them using coinbase wallet, does this count as a offchain transaction? If it was an offchain transaction, shouldn't it be instant? Why did it take 5 mins of pending to clear? 

Also, if I did want to pay them a transaction on the blockchain, would i need a different app that isn't online wallet based? Apps such as Bitcoin Wallet App instead of Coinbase or Xapo?

Many thanks.
Coinbase will do an offline transaction depending on whether the recipient address is part of coinbase wallet. If recipient address is part of a coinbase wallet then the tx can be easily done offline, otherwise the tx has to be on bitcoin blockchain.

If you use wallets like electrum/mycelium they will always do onchain transactions.