The aim of the European Payment Services Directive (PSD2 - Payment Services Directive) is primarily to provide consumers with a higher level of security and flexibility when performing payment transactions in the EU.
More information about safe and easy use of payment services via API protocols can be found
here .