The "gs" "file" is an internal file to the Apps Script file. I just want to make sure what file is meant. Each Apps Script file shows up in your Drive. A "gs" file is internal to the Apps Script file. I'm not talking about adding another "gs" file internally to the Apps Script file.
I'm currently using a separate Apps Script file from the add-on file to receive the IPN request. Although, I'm starting to think about other possibilities and a different flow of events because of this discussion. I'd need to do some experimenting to know for sure what other possibility there is and whether it would work or not.
The url that you put into the setting for the PayPal IPN needs to be the url with the "exec" on the end. That is the published url for public use.
Whether you use a separate Apps Script file from the file that you are using for the add-on to receive the IPN request, or you use the same Apps Script file for both the add-on and the web app, either way, you need to publish the Web App to get the url to set in the PayPal settings.
Again, I'm using a totally separate Apps Script file from the add-on file for the Web App, and because I have multiple paid add-ons, it makes sense for me to have one central web app for all of them. I've read that PayPal doesn't allow multiple IPN listeners. If they did allow multiple different IPN listeners, then I'd probably experiment with combining the add-on and web app code into one Apps Script file.