Adding transaction details to "Thank you!"-page and order confirmation

Hey everyone!

I want to showcase the following information on the THank you page and order confirmation email.

  • Status: Transaction succeded
  • Order ID: 8210425021
  • Amount: 1000.00 EUR
  • Card Type: VISA ****1234
  • Bank Code: XXXXXX
  • Timestamp: 2017-02-20 11:53:34+***

Shopify Chatbot gave me the following code to copy into order.liquid and notification code, but it is not working:

Status: {{ transaction.status }}

Order ID: {{ order.id }}

Amount: {{ order.total_price | money }}

Card Type: {{ transaction.payment_method | slice: 0, 4 }}****{{ transaction.payment_method | slice: -4 }}

Bank Code: {{ transaction.bank_code }}

Timestamp: {{ transaction.created_at }}

I’m using Narrative theme. Also the chatbot mentioned a {{ order.payment_details }} variable. I cant seem to find it in my theme. Could that be the issue? Please see below how I implemented the snippet in the screenshots.