0
votes

I'm building an analytics application where a user can sign up and connect their PayPal account (using API credentials). At that point, I would like to bind their account in a way such that every time something happens (such as a transaction, refund, recurring subscription payment etc.), I get a notification with details, so it can be saved in my database and I can update the analytics.

I know PayPal IPN allows me to bind details on my account. But how would I make it work so I can get info from the users? I'm using PayPal's Classic API, so my only option seems to be using IPN.

1
All they have to do is add your IPN URL to their account. You can't do that for them. If they already have an IPN URL of their own you're out of luck, of course. - user207421
Oh, and does this problem exist with WebHooks? Or do that work differently? If so, can I use WebHooks with classic API? - DemCodeLines
You can only have one IPN URL but I don't know anything about Webhooks. Whatever solution you adopt will surely require some action on the customer's part. - user207421

1 Answers

0
votes

You can include the NOTIFYURL parameter in API requests (notify_url in standard buttons) to set a URL for IPN. So you can set this to your own IPN and it would override anything in the seller's PayPal profile.

The thing about that is if they're using IPN themselves they're not going to like that you're overriding their's because then their's won't run and do what they want it to do.

Because of that, you'll want to prepare with a quick way you can setup a forwarder so the PayPal IPN hits you, and then you forward it to their URL so their script can run, too.