Skip to main content
Magento

How to Add Order ID and IP Address in Invoice in Magento 2?

Learn how to add order ID and customer IP address information to invoices in Magento 2 for better tracking and record-keeping.

How to Add Order ID and IP Address in Invoice in Magento 2?

Introduction

Adding additional information like Order ID and IP address to your Magento 2 invoices can help with order tracking, fraud prevention, and record-keeping.

Step-by-Step Guide

To add Order ID and IP address to your invoice template in Magento 2:

  • Navigate to Admin Panel and go to Marketing → Communications → Email Templates
  • Find the Sales Invoice template
  • Edit the template and add the following variables:

Adding Order ID

Add the following code to your invoice template:

Code implementation available in the full documentation.

Adding IP Address

To display the customer’s IP address in the invoice:

Code implementation available in the full documentation.

Benefits

  • Better order tracking and management
  • Enhanced security and fraud detection
  • Improved customer service with detailed records
  • Compliance with business requirements

Conclusion

By adding Order ID and IP address to your Magento 2 invoices, you can maintain better control over your orders and enhance the security of your store.

Need help with this?

Get managed Magento hosting tuned for performance.

Learn more