Help Article

Ask our Business Community

Get started and join the conversation to use PayPal for business in the Headstart Community.

Why did I get the error " Received fatal alert: handshake_failure error" with the Java SDK?

PayPal returned a fatal handshare failure error.

This error occurs when:
  • The axis.socketSecureFactory property was set incorrectly.
  • You set the wrong environment in the Java SDK.


Setting the axis.socketSecureFactory property
Check that the axis.socketSecureFactory property was set to com.paypal.sdk.core.DefaultSSLFactory before the Axis initialization. The PayPal Java SDK sets this property automatically using the following statement:

org.apache.axis.AxisProperties.setProperty("axis.socketSecureFactory", "com.paypal.sdk.core.DefaultSSLFactory");

If Axis is initialized outside the PayPal Java SDK, check that the property is correctly set in your initialization code.

Environment mismatch
Check that you set the correct environment in the SDK. For example, you used your Sandbox API username and password and certificate, but you set the environment to Live rather than Sandbox (or vice versa).
We’re sorry, the page you’re looking for is no longer available. Please try your search again in our Help Center if you have a question or want to contact us.