Access gift_card Object in notifications/Order Confirmation email template

I am trying to get the last 4 digits of a gift card to display when a gift card is used for payment in the Order Confirmation email template using {{ transaction.payment_details.gift_card.last_four_characters }} but it does not return anything.

I know the docs for the gift_card object say:

The gift_card object can be accessed in the following templates:

  1. The Gift card created email notification template
  2. The gift_card.liquid template

Are we really not able to access gift card information in the order confirmation email template?

I’m trying to do the same. Did you ever figure out how to do it?