In order to add in-app purchases to your app on the App Store, you need to complete:
Apple's agreements for Paid Apps
Setup contacts
Enter your banking information
Submit taxes forms
You can find more information on all these steps in Apple's documentation.
Log in to https://appstoreconnect.apple.com/ and select Agreements, Tax, and Banking. Under the Agreements tab, make sure that Paid Apps shows status Active. If it is not Active, follow the instructions to complete the agreements.