Does Apple allow third-party payment integration to access app features?

I am, Developing an app for conducting quizzes and exams for students. This app work with a subscription plan. I wanted to know if integrating a third-party payment gateway would increase the chances that Apple will reject my application and require me to use in-app purchases instead.

I think it may require you to add (not replace) IAP in your app. It may depends if the app requires this subscription to work or not.

Does Apple allow third-party payment integration to access app features?
 
 
Q