The Pi starter kit comes with two input modules, 10-32v DC and 90-140v AC.
The photo eye should output a signal that is going to work with either of those two voltages.
Not sure where you usual buy from, so just picked Amazon as an example…
Here is a photo eye with a good range of distance and output signal;
I like this one as it works more on a beam, so you can put the reflector on the other side of the bag track.
Also this sensor has a really good range of voltages that it will run off, so you should be covered in that regard.
The sensor output is a dry contact, so you could easily run the sensor off one range of voltages, and use a different voltage source on the sensor relay and then into the Opto module.
If you don’t mind buying another Opto module, you could buy the G4IDC5-SW module. It is designed to accept dry contact inputs just like this sensor uses.
But if you have a small transformer or DC supply in the range of the the two input modules from the starter kit, you can start with those - so you have a choice is my point.
I’m more of a hardware guy, so feel free to ask any questions.
Wondering what your software language of choice is going to be for the Pi?