Webhook: Get notified if a users pays a bill with specific item_number

Elenktik
Contributor
Contributor

Hi Community,

 

if a user orders something in my web app, he gets an HTML mail with a paypal button, something like this:

 

https://www.paypal.com/cgi-bin/webscr?currency_code=EUR&cmd=_xclick&business=***&quantity=50&item_na...

 

Now I would like to create a webhook that communicates to my web app if the user has payed the bill with `item_number=ICI10989TO11038WHO0TO0`.

 

Is this possible out of the box, or do I somehow need to register an invoice with such an item_number before I send the paypal button to the customer?

 

I checked the webhook events at https://developer.paypal.com/docs/integration/direct/webhooks/event-names/ and I only found `INVOICING.INVOICE.PAID`. Is this webhook triggered if someone clicks the above url and pays?

Login to Me Too
1 REPLY 1

angelleye
Advisor
Advisor

The payment link example you have here is for PayPal Payments Standard.  This will not trigger webhooks, but instead will trigger an IPN.

 

So you would need to setup an IPN listener on your server, and this would receive any IPNs that PayPal sends.  Within that, you can check the txn_type and other details like item_number, and build logic to react accordingly based on the IPN data.

 

 

Angell EYE - www.angelleye.com
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!
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.