Search code examples
paypalpaypal-ipnpaypal-sandbox

Setting paypal IPN url programmatically


Can I have paypal IPN redirect to a unique URL for each transaction?

For instance,

transaction 1 - www.WebSite.com/Listener/1

transaction 2 - www.WebSite.com/Listener/2

transaction 3 - www.WebSite.com/Listener/3

I know which field to set programmatically, but documentation points out that only one URL can be used and I am not sure if above examples are also included.


Solution

  • Here you go:

    <INPUT TYPE="hidden" NAME="notify_url" value="URLspecificToThisTransaction">
    

    "PayPal posts HTML FORM variables to a program at a URL you specify. You can specify this URL either in your account profile or with the notify_url variable on each transaction"

    This should override the setting you have on your account. See this document for further information.

    https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/formbasics/

    Hope this helps!