{"id":1254,"date":"2020-09-23T07:48:40","date_gmt":"2020-09-23T07:48:40","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/2020\/09\/23\/add-order-id-in-invoice-pdf-in-magento-2\/"},"modified":"2025-05-21T17:49:52","modified_gmt":"2025-05-21T12:19:52","slug":"add-order-id-in-invoice-pdf-in-magento-2","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/add-order-id-in-invoice-pdf-in-magento-2\/","title":{"rendered":"How to Add Order ID in Invoice PDF in Magento 2"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Magento 2 order ID can be shown in the sales documents like invoice, shipment, or credit memo. The order ID in Magento 2 makes the admin\u2019s order management task easier.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The admin can&nbsp;<a href=\"https:\/\/meetanshi.com\/blog\/get-invoice-data-from-order-id-in-magento-2\/\" target=\"_blank\" rel=\"noreferrer noopener\">get invoice data from order ID<\/a>&nbsp;as well as the&nbsp;<a href=\"https:\/\/meetanshi.com\/blog\/get-order-information-by-order-id-in-magento-2\/\" target=\"_blank\" rel=\"noreferrer noopener\">order information in Magento 2<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Not only that, but the customers also use order ID to track their orders in Magento 2 store. The extensions like&nbsp;<a href=\"https:\/\/meetanshi.com\/magento-2-order-tracking.html\" target=\"_blank\" rel=\"noreferrer noopener\">Magento 2 Order Tracking<\/a>&nbsp;uses only order ID and email address to let customers track their orders. You can also&nbsp;<a href=\"https:\/\/meetanshi.com\/blog\/create-barcode-and-add-it-in-magento-2-invoice-pdf\/\">create barcode and add it in Magento 2 invoice PDF<\/a>&nbsp;as it helps the customer to scan and get the order id using which it is easy to get order details.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Hence, it can be quite useful to&nbsp;<em><strong>add order ID in&nbsp;<a href=\"https:\/\/meetanshi.com\/blog\/display-extra-fee-to-the-total-of-order-invoice-pdf-in-magento-2\/\">invoice PDF<\/a>&nbsp;in Magento 2<\/strong><\/em>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Steps to Add Order ID in Invoice PDF in Magento 2<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2020\/09\/Steps-to-Add-Order-ID-in-Invoice-PDF-in-Magento-2-1024x403.png\" alt=\"Steps to Add Order ID in Invoice PDF in Magento 2\" class=\"wp-image-10551\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Login<\/strong>&nbsp;to Magento 2 admin panel<\/li>\n\n\n\n<li>Go to&nbsp;<strong>Stores &gt; Settings &gt; Configuration<\/strong><\/li>\n\n\n\n<li>Under&nbsp;<strong>Sales<\/strong>, select&nbsp;<strong>PDF Print-outs<\/strong><\/li>\n\n\n\n<li>Expand the&nbsp;<strong>Invoice<\/strong>&nbsp;sectionto Add Order ID in Invoice PDF in Magento 2<\/li>\n\n\n\n<li>Set Yes in&nbsp;<strong>Display Order ID in Header<\/strong>&nbsp;to enable order ID in invoice PDF.<\/li>\n\n\n\n<li>Click&nbsp;<strong>Save Config<\/strong><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">That\u2019s it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The admin can also add order ID in other sales documents like shipment and credit memo.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once done, the invoice PDF displays the order id as shown here:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2020\/09\/Order-ID-in-Invoice-PDF-in-Magento-2.png\" alt=\"Order ID in Invoice PDF in Magento 2\" class=\"wp-image-10552\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If you choose to not add order ID in the sales document, the invoice looks like this:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2020\/09\/Not-Show-Order-ID-in-Invoice-PDF-in-Magento-2.png\" alt=\"Not Show Order ID in Invoice PDF in Magento 2\" class=\"wp-image-10553\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Moreover, the store owner can use&nbsp;<a href=\"https:\/\/meetanshi.com\/magento-2-custom-order-number.html\" target=\"_blank\" rel=\"noreferrer noopener\">Magento 2 Custom Order Number<\/a>&nbsp;extension for customizing order numbers by prefixes, suffixes, letters, counter, or any random numbers to match your business needs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Don\u2019t forget to share this post with Magento Community via social media.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can also refer to Add Order ID in Invoice PDF in Magento 2 from our&nbsp;<a href=\"https:\/\/www.youtube.com\/playlist?list=PLBTOxSAJzwEjM5MilmEqj98Ib80tKBu7r\" target=\"_blank\" rel=\"noreferrer noopener\">Magento 2 video tutorial<\/a>&nbsp;series:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"How to Add Order ID in Invoice PDF in Magento 2\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/wsWww0Hm15g?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Thank you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Magento 2 order ID can be shown in the sales documents like invoice, shipment, or credit memo. The order ID in Magento 2 makes the&#8230;<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-1254","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1254","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=1254"}],"version-history":[{"count":2,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1254\/revisions"}],"predecessor-version":[{"id":13969,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1254\/revisions\/13969"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=1254"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=1254"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=1254"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}