PayPal webhook did not receive any events - paypal

I created a PayPal plus Payment in my website. I can choose a payment methode and I can pay.
I have also created a PayPal webhook. The webhook works. I tested it in the webhook simulator.
The problem is: if I pay i receive nothing in my webhook.
What can I do?

Presumably you need to Subscribe to Events by providing your webhook URLs PayPal; note that this is completely separate from testing in the simulator. See: https://developer.paypal.com/docs/integration/direct/webhooks/rest-webhooks/#subscribe-to-events

Related

Does PayPal REST Webhook supports instant payments notification

I am building the system to listen to the Payment changes in PayPal for that I research and recommended using Webhooks over the IPN.
As of now, I can able to create an app and add webhooks with event subscribers. Also, with the webhook simulator I am getting notified correctly but with the actual Payment made in the sandbox does not trigger anything to the listener.
I have verified the correct business account linked with credentials as well.
Everything is working perfectly except the Webhooks triggering from PayPal.
Also, as noting is triggering I do not have debug id as well.
If you have not registered any webhook listeners for any of your REST Apps (either sandbox or live), PayPal will not send any webhooks because it does not know which ones to send events for, or where to send them.
To register webhooks for an app, either:
Find the app for the correct sandbox account in My Apps and Credentials (or create one), and Add Webhook
Do so via using thewebhooks API, with the correct REST App client id and secret for authentication
Until you register a listener URL for event(s), no webhooks will be sent.

Pay Pal webhooks never called

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?
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
Visit URL: https://developer.paypal.com/developer/applications/ and
click 'create app'
Give your Application some name and move forward.
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'.
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.
Step 3: Listening for WebHooks
Webhook Details:
https://developer.paypal.com/docs/api-basics/notifications/webhooks/event-names/#sales
The webhook you need to listen for auto-renewing subscriptions is: PAYMENT.SALE.COMPLETED
Step 4: Verifying you are getting the Callbacks
You can visit:
https://developer.paypal.com/developer/dashboard/webhooks/live to see
all the webhooks that were fired by PayPal (only stores up to 30 days).
Personally, I would try to log everything that I receive at my
endpoint and compare my log with PayPal's log.
Step 4: Validating the Callbacks
Furthermore, you can also visit:
https://developer.paypal.com/docs/api-basics/notifications/webhooks/rest/#to-use-the-paypal-rest-sdks-to-verify-event-notifications
to get the sample code(s) to validate the callback (webhooks) once you receive
them.
Please understand the distinction as i have quoted from the below sources.
The PayPal REST APIs use webhooks for event notification.
.
.
The Paypal BuyButton triggers IPN

REST Client not generating Webhook Events in Sandbox

I am unable to get the Paypal provided REST client (the client side js) to trigger webhook events in the sandbox to receive payment confirmation on my server app.
Here's what I can do/ have done:
I have created a REST app in the sandbox.
I have subscribed to all webhook events.
I am able to pay with the client app using my sandbox client id and see see the payment reflected in the facilitator account.
I am able to generate a webhook event using the Webhook simulator and receive it / parse it on my server.
However, when I do a sandbox payment transaction using the client, no webhook event is created (as reflected in the Webhook events list provided in the dashboard), nor it is sent to my server. Again, my server receives simulated webhooks just fine.
The problem seems to be that the Paypal REST Client is not generating a webhook event. I have tripled checked everything, but cannot see what I've missed. Help!
I have the same problem. I racked my brain trying to figure out if something was wrong with my code. I contacted Paypal and they said this is an ongoing issue with Paypal sandbox and are working to resolve it.

Using PayPal webhooks with NVP DoExpressCheckoutPayment

I'm working on a website where a user can pay for products to another user, the user that is getting paid has his API Signature set and the payment is accomplished using ExpressCheckout (NVP) (the payer just gets redirected to a PayPal page where he logs in if necessary and just clicks a button to pay).
The problem is I tried using webhooks to track refunds for these payments, so I can later insert the refund data into my database via callback URL (php function), but the URL I've set doesn't get called at all(I've previously simulated an event on the same URL and everything was fine).
I am trying to get this to work by setting my API Signature and a friend of mine paying me some cents(via DoExpressCheckoutPayment) after which I refund them to him (no calls, only using the PayPal website).
Also nothing appears on the Sandbox Webhooks Events page or the Live one. I've tried registering other events like "Payment capture completed" or "Payment sale completed" to my webhook but with the same result.
Do I have to change some settings in my account? I've created a REST API app in order to use webhooks, but I've seen there's an option for NVP/SOAP API apps. I have considered IPN if webhooks don't work.
"Webhooks" are used with the REST API. Express Checkout uses IPN.
You'll need to setup a separate listener for IPN similar to what you've done with webhooks on the REST API.

Paypal doesn't fire webhook on BILLING.SUBSCRIPTION.CANCELLED in sandbox

I haven't tested in live, but currently I have a webhook subscribed to the following events
Billing subscription cancelled
Billing subscription created
Billing subscription re-activated
Billing subscription suspended
Billing subscription updated
I'm receiving Webhook events for CREATED but nothing is being sent when a user cancels the subscription from their PayPal dashboard.
Is this expected behavior? is there another event I should be subscribe to to capture that user action?
Is there a debug id that you can share so we can trouble shoot?
Thanks,
Usha
From Paypal support (I still don't understand why the BILLING.SUBSCRIPTION.CANCELLED doesn't fire when a user cancels from their dashboard, similar issue here: BILLING.SUBSCRIPTION.CANCELLED does not fire upon user action?)
"But surely users subscribing via the button is the most common method of subscribing (how else would they subscribe?). The IPN route seems like a completely non-developer-friendly one (seeing as there isn't even simulator events for it)"
If you integrate a solution which is not based on our REST API's and want to receive HTTP notifications, you need to use instant payment notification (IPN). The IPN simulator may not provide a method of simulating the events, but you can create subscriptions in our sandbox environment and setup a sandbox business account with IPN and test cancelling the subscriptions, which will generate an IPN for the cancellation. We have a sandbox testing guide available here if you're not familiar with that environment and want to get started.
"So why would webhooks ONLY fire for API-based subscriptions (and why would a business website subscribe users using the API rather than the simple button)? What is the logic behind this?"
It depends on the integration and needs of the individual business. Some businesses only use our REST-based API solutions for their complete integration, from checkout payments to subscriptions and logically, this makes sense to them to only have to use one set of API's for their complete integration. Other business only want / need a more simple solution such as using buttons and as these are legacy solutions which are not REST-based, they use our legacy HTTP notification service which is instant payment notification (IPN).