Instant Payment Notification
(Copied from https://www.x.com/developers/paypal/products/instant-payment-notification)
Check your account status. Login to PayPal. Go to your PayPal Profile and click My settings. Confirm that your “Account type” is either Premier or Business, or upgrade your account.
Check your API
settings. Click My selling tools. Expand “Selling online” if needed and check “API access.” Click Update and Add or edit API
permission or View API
In your PayPal Profile, click My selling tools, click Instant Payment Notification. Follow the instructions to enable your IPN including entering your Notification URL
To create a basic IPN listener script, use the PayPal IPN script generator. If necessary, modify the script to meet your needs.
Install the script on your website at the Notification URL
you specified in your PayPal Profile.
Test your script using the PayPal Sandbox. (Registration is free.)
Once you’ve verified that your implementation works correctly in the Sandbox, you’re now ready to go live.