If you enter the A Number and DOC Case ID
in the Immigration Fee website, it will let you know if you have to pay or not:
USCIS - Immigrant Fee - Enter Data
If fee has been paied, the site won't let you continue. If you can pay it, you should pay it.