Checkout.transactions object is empty (Shopify Plus)

I am trying to customize the checkout on a Shopify Plus so that if the primary payment method fails for any reason, I can suggest or redirect the customer to an alternative payment gateway.

The problem is that the transactions field of checkout object is always empty when the payment fails. I was pretty sure that 6/12 months ago it was working because a previous developer tested that, but it seems that it doesn’t work anymore.

I tried everything, with no luck. Everything listed here and coded inside checkout.liquid return empty results:

Transactions: {{ checkout.transactions }}
  
          Transactions Json: {{ checkout.transactions | json }}

          {% for ts in checkout.transactions %}
            Gateway: {{ ts.gateway }}

            Status: {{ ts.status }}

          {% endfor %}
          
          {% assign transaction = transactions | last %}
          Gateway: {{ transaction.gateway }}

          Status: {{ transaction.status }}

          Gateway: {{ checkout.transactions[0].gateway }}

          Status: {{ checkout.transactions[0].status }}

Do you have any suggestions?