Search code examples
paypalpaypal-ipn

Must PayPal's "custom" variable be unique?


In the PayPal IPN, one of the variables you can pass to PayPal is called custom. According to the documentation, this is

User-defined field which PayPal passes through the system and returns to you in your merchant payment notification email. Subscribers do not see this field.

It is sent to PayPal, and PayPal send it back to you unaltered. It can be useful for matching up PayPal’s record of an order with our record thereof.

We’ve built a website for a customer which includes a PayPal checkout. The custom variable is a simple incrementing integer. Now they have asked someone else to build an app for them. The app also uses PayPal, and also has a custom field which is a simple incrementing integer. Is this likely to be a problem? I cannot tell from the PayPal documentation whether it matters that the custom field be unique.

Of course, our listener URL for the website purchases will never see the app purchases.


Solution

  • No it doesn't have to be unique, if you include the optional invoice variable - that must be unique (you can bypass that though in the profile setting).