You have to do it from your Apple account. If you’re trying to do a battery replacement, go to your device’s Settings, scroll down and find Battery, click on Service Battery (I think that’s what it is called), and it will redirect you to a site with directions.
Yes you have to do it online. Or you can ask for more assistance at the Apple store.
Thanks! Your answer is awaiting moderation.