I am currently testing the changes for version 4.0 of the protocol for PSD2 using Direct Integration.

I am running under Visual Studio using a localhost website address.

When calling the SagePay payment endpoint with ThreeDSNotificationURL set as a localhost address (<http://localhost:15536/Payments/ThreeDResponse>) I receive the following error '3228 : The ThreeDSNotificationURL field format is invalid.' 

If I change this field to a fully qualified domain (<http://www.google.com>) I no longer receive the error, but can't complete my testing.

Using localhost for the termurl in version 3.0 of the protocol works as expected.