Taxi drivers in Madrid accept payments both in cash or via credit/debit card. However, it is advisable to have some euros with you, in case the POS is broken, currently out of service, etc. Taxi drivers are obligated to give change from 20€/20$. Hence, you should carry small bills to pay for your taxi transfer.