I withdrew my paper application but I'm positive that the same needs to be done with online application. You have to fill CIT0027E and MAIL it to CPC-Sydney or your local office(if your file has already been transferred). Be aware, if they have already started processing, you will only get $100 back.
https://www.cic.gc.ca/english/helpcentre/answer.asp?qnum=735&top=5
If you don't meet the citizenship requirement, they will probably return your application anyways and send you the $100 back eventually.
You can also log in to your "My Account" which you used for payment unless you paid directly, and under receipts you can request a refund for the fee. I will recommend this approach if you haven't received AOR yet because AOR is when they load the payment on to your application.
So if you are refunded before they get to your application, they will automatically reject your application as incomplete and send you an email asking for payment. At that point you can let them know that you would like to withdraw your application.
Hope it helps!