0

I have been using Pay Pal for payments from our website for many years without problems. We currently use Pay Pal buttons to redirect to Pay Pal's website for the payment, and have it return to our website to record the payment.

Now we are trying to configure webhooks in Pay Pal to have it notify our server of payments. The goal is to have auto renewing subscriptions that call the webhook every month when Pay Pal automatically processes the payment.

So I setup the webhooks on, https://developer.paypal.com/

I setup the webhooks for both the sandbox and live account, and verified it can call the webhook successfully through their webhook simulator.

However, when any payment is made through our website the webhooks are never called?

I've tried everything, but they are never called.

Are the webhooks only called if you make the payment through the Pay Pal API, or are they also called if a payment is made directly, or through a Pay Pal button?

Do they get called for auto-renewing subscriptions?

James
  • 17,965
  • 11
  • 91
  • 146
  • So from more testing it seems webhooks are never called for normal Pay Pal payments, or from Pay Pal buttons? If we instead use the Pay Pal API, we can trigger a webhook call, but I'm not sure the point of the API or webhooks? – James Oct 05 '20 at 21:07
  • Seems like Pay Pal also has IPN, which also calls a webhook on your server (but completely separate from their "webhooks", not sure the point), we do seem to get the IPN events though, so will probably use it instead of the webhooks, which seem like they don't work at all, https://developer.paypal.com/docs/api-basics/notifications/ipn/ – James Oct 05 '20 at 21:09
  • IPN is the old legacy service, which predates webhooks by over a decade – Preston PHX Oct 06 '20 at 09:14
  • but IPN works, webhooks don't work at all for most payments, you have to like call the API for it to send you the webhook, what's the point of that, I can just call my own webhook instead of the API, I need to be notified when anyone pays, however they pay, when ever they pay, where ever they pay, webhooks from my understanding seem to be completely useless – James Oct 06 '20 at 19:46

2 Answers2

3

Okay, so now I know that said you did set up the webhooks. However, I am still going to include doing that in my answer anyway.

Step 1: Creating The PayPal Application

enter image description here

  • Give your Application some name and move forward.

enter image description here

Step 2: Adding/Managing WebHooks For Your Application

  • After creating the app, you will be presented with this screen. Scroll a bit down and click 'Add Webhook'.

enter image description here

  • Add your desired webhooks (subscription webhooks are here). If you are not sure. Just choose 'All events' (the first option) for the time being. Also, make sure you add a Webhook URL.

enter image description here

Step 3: Listening for WebHooks

enter image description here

Step 4: Verifying you are getting the Callbacks

enter image description here

Step 4: Validating the Callbacks

enter image description here

Hackinet
  • 3,252
  • 1
  • 10
  • 22
  • So from more testing it seems webhooks are never called for normal Pay Pal payments, or from Pay Pal buttons? If we instead use the Pay Pal API, we can trigger a webhook call, but I'm not sure the point of the API or webhooks? – James Oct 05 '20 at 21:10
  • vs IPN, which actually seems to work unlike webhooks, which seem useless – James Oct 05 '20 at 21:10
  • 2
    @James https://stackoverflow.com/a/56309653/9920079 and, yes calling the API is the only way for the webhook to work. – Hackinet Oct 05 '20 at 21:32
  • 1
    @James If I may suggest, please just use https://stripe.com/docs It's *extremely* straightforward, quick, and easy to setup. As a web developer, I hate PayPal the most among all payment processors. PayPal's APIs are bad and disorganized. And worse, their tech support rarely replies. – Hackinet Oct 05 '20 at 21:37
  • 2
    @James Sandbox webhooks don't work for me either - they used to, about 10 days ago, but they don't anymore and it's blocking me from delivering too. PayPal is an atrocious company to deal with as a developer. They can't even get a nuget package out of beta. Stripe is vastly better. – krisdyson Oct 09 '20 at 15:28
2

Please understand the distinction as i have quoted from the below sources.

The PayPal REST APIs use webhooks for event notification.enter image description here

.


.

The Paypal BuyButton triggers IPN enter image description here

nikhil swami
  • 2,360
  • 5
  • 15