Why my Magento 2 is not generating Giftcard's code?
I work at LeSite as Technology Director, where I’m responsible for lead the technical team to building innovative products.
My passion for building software and sharing knowledge brought me to speak in over 14 conferences and create 21 projects used for more than 20,000 developers in the world. Now, I’m focused on helping merchants bringing innovation and technology strategy to their e-commerce ecosystem using the Magento 2, Adobe Commerce, Shopify Plus and other platforms.
Analyzing some orders workflow to a client we saw that in some orders the gift card code wasn’t generated. Inside the order’s details, it was showing as below.
Gift Card Accounts: N/A
Analyzing the situation it was caused because of one specific payment method, it was set as Authorize only and not Authorize & Capture, the gif card code is generated only when the invoice is created.
So if you did a test order and didn’t have the gift card code, try to invoice it, you will receive a new email with the code.
To check all the Giftcard codes generated you can go to the admin panel in Marketing > Promotions > Gift Card Account.
If you can you might able to fix it by changing the payment method to Authorize & Capture or restricting the payment methods allowed to buy the gift cards.




