Search code examples
paypalpaypal-ipn

PayPal user to user IPN? How to confirm if a transaction happened?


Is it possible to confirm if a payment was made from one user to another via PayPal? Basically my site will enable users to create listings with a product they are selling, then another user will click "buy" and then will process the payment to the user. Will the IPN allow me to confirm these sorts of transactions?

Basically once the user is paid from the other user I want the listing to be removed from the site. Haven't got a clue where to start with this stuff.


Solution

  • Yes, IPN would be good to use for this, but your question is indeed rather broad.

    Are you working with PHP? WordPress, by chance? If so, you could get up and running real quick with PayPal IPN for WordPress. If not, you can find IPN libraries for pretty much any development language.

    You'll definitely want to familiarize yourself with the IPN documentation. There is a section specific to creating a listener with links to code samples in various languages.

    You can also check out the IPN variables documentation for a look at the types of data you'll get in the IPNs you receive based on the different types.

    From within your script you'll simply pull out the sender_email, receiver_email, etc. and then you can update your database, send email notifications, etc. accordingly.