My Application got rejected Recently with following error

Guideline 3.1.1 - Business - Payments - In-App Purchase

We noticed that your app offers a subscription with a mechanism other than the in-app purchase API.

Next Steps

To resolve this issue, please revise your app to ensure that the subscription for products used within the app is offered using the in-app purchase API, with the exception of the content specified in guideline 3.1.3 of the App Store Review Guidelines.

In-App Purchase

It may be appropriate to revise your app to use the in-app purchase API to provide content purchasing functionality.

In-app purchase provides several benefits, including:

* The flexibility to support a variety of business models.
* Impacting your app ranking by consolidating your sales to one app rather than distributing them across multiple apps.
* An effective marketing vehicle to drive additional sales of new content.

For step-by-step instructions on in-app purchase creation within App Store Connect, refer to App Store Connect Help.