Wouldn’t it be simpler and easier to use Amazon Allowance instead? Simpler because no email codes would be involved. You’d simply use your gift cards (or any payment sources that Amazon accepts) to instruct Amazon to send an allowance to your account, by providing the email address that Amazon associates with your account. When an account receives an allowance, Amazon automatically adds the amount to the account’s Amazon Gift Card balance. For info about Amazon Allowance see:
https://www.amazon.com/b/ref=sv_gc_8?ie=UTF8&node=11453461011