I'm unable to get webhooks working in sandbox

buken05
Contributor
Contributor

I have a live site that is using PayPal IPN. It is working fine today. I'm in the middle of upgrading the PayPal integration to use the REST APIs. I have everything set up in the sandbox environment and payments are coming through fine in my staging environment. The problem is that webhooks are not making it to my staging site.

 

I see the PAYMENT.CAPTURE.COMPLETED event in the developer dahsboard but inside the transmissions section the webhook pointing to my staging site is always "Pending" as if PayPal hasn't even attempted to connect. I also see no incoming traffic in my server logs.

 

I even tried to set up another webhook using webhook.site and that worked fine. Is my domain blacklisted for some reason or do I need to do anything to get it approved for webhooks? Is there any way I can get more detail on why those requests failed?

 

Thanks in advance for all your help.

Login to Me Too
1 ACCEPTED SOLUTION

Accepted Solutions
Solved

MTS_Jennifer
Moderator
Moderator

Hello @buken05 ,

Thank you for posting to the PayPal Community.

Since you are able to receive webhooks when you use https://webhook.site,  however you are not able to receive webhooks with your staging environment, it is possible that your staging environment is not in a format that allows our webhook server to communicate.

This is the documentation on webhooks:

https://developer.paypal.com/api/rest/webhooks/ - general overview

https://developer.paypal.com/api/rest/webhooks/rest/  - additional information

 

The rest listener cannot be on a local host url. The listener needs to be a url that is TLS 1.2 compliant in a https:// format. If your staging listener is on a local host you will not be able to receive webhook notifications.

 

Also make certain that you are not blocking any PayPal IP addresses:

https://www.paypal.com/us/smarthelp/article/what-are-the-ip-addresses-for-paypal-nvp-soap-servers-ts...

 

Thanks,

Jennifer

MTS

PayPal

View solution in original post

Login to Me Too
2 REPLIES 2
Solved

MTS_Jennifer
Moderator
Moderator

Hello @buken05 ,

Thank you for posting to the PayPal Community.

Since you are able to receive webhooks when you use https://webhook.site,  however you are not able to receive webhooks with your staging environment, it is possible that your staging environment is not in a format that allows our webhook server to communicate.

This is the documentation on webhooks:

https://developer.paypal.com/api/rest/webhooks/ - general overview

https://developer.paypal.com/api/rest/webhooks/rest/  - additional information

 

The rest listener cannot be on a local host url. The listener needs to be a url that is TLS 1.2 compliant in a https:// format. If your staging listener is on a local host you will not be able to receive webhook notifications.

 

Also make certain that you are not blocking any PayPal IP addresses:

https://www.paypal.com/us/smarthelp/article/what-are-the-ip-addresses-for-paypal-nvp-soap-servers-ts...

 

Thanks,

Jennifer

MTS

PayPal

Login to Me Too

buken05
Contributor
Contributor

Thank you @MTS_Jennifer for the quick reply. This information was helpful. I am hosting the staging environment at locally but i'm also using packetriot (similar to ngrok) to tunnel the traffic to my machine. It turns out my tunnel was misconfigured and was forwarding http traffic but not https. I fixed that and now webhooks are working end-to-end.

 

Thanks a lot.

Login to Me Too

Haven't Found your Answer?

It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.