It's rather straightforward. You link your PSO2 account to PSO2es (more details below), after doing the tutorial you just go to the option to buy AC, purchase AC (it uses google wallet for purchases), and it automatically gets added to your PSO2 account.
About linking a PSO2 account to PSO2es, when first using PSO2es, after it's done updating, the window below appears.
The smartphone icon is for first time players while the Phantasy Star Online 2 icon is for those who have a PSO2 account (this option is the one that links PSO2es to PSO2).