Ask Mac Questions and Get Answers from Experts ASAP
Ok, I double checked on this for you and it appears Apple Store terms have changed on this in the last three years and Gift cards can not be used to purchase other gifts. :-(
Gift credits, also, can not be transferred to other accounts once they have been redeemed.
You CAN make purchases under the old ID and use them on the iPhone. However, there is a caveat there. Any purchases made under the "old" ID will ALWAYS be linked to the old account, so any time they were updated you would need to provide sign in details.
It may not be exactly what you want, but I might suggest to purchase a gift card under the "old" account and send it to the new one used on the iPhone and then make the purchases directly there. This would allow the apps to be owned by the new ID and the list of app purchases would not appear under the old one.