---
title: "How to Get Invoice Information Using SOAP API in Magento 2"
url: "https://magecomp.com/blog/get-invoice-information-using-soap-api-magento-2/"
date: "2022-01-28T12:30:44+00:00"
modified: "2025-02-18T04:53:48+00:00"
author:
  name: "Dhiren Vasoya"
  url: "https://magecomp.com/"
categories:
  - "How To"
  - "Magento 2"
word_count: 253
reading_time: "2 min read"
summary: "Hello Magento Friends,"
description: "Get invoice information outside of Magento 2. $response = $request->SalesInvoiceRepositoryV1Get(array('id' => 2)); Know more"
keywords: "How To, Magento 2"
language: "en"
schema_type: "Article"
related_posts:
  - title: "Top Magento Development Companies in USA"
    url: "https://magecomp.com/blog/top-magento-development-companies-usa/"
  - title: "How to Reindex Specific Products Programmatically in Magento 2?"
    url: "https://magecomp.com/blog/reindex-specific-products-programmatically-magento-2/"
  - title: "How to add Custom Sorting Field in the Category of Magento 2?"
    url: "https://magecomp.com/blog/add-custom-sorting-field-category-magento-2/"
---

# How to Get Invoice Information Using SOAP API in Magento 2

_Published: January 28, 2022_  
_Author: Dhiren Vasoya_  

![How to Get Invoice Information Using SOAP API in Magento 2](https://magecomp.com/blog/wp-content/uploads/2022/01/How-to-Get-Invoice-Information-Using-SOAP-API-in-Magento-2-1024x512.webp)

**Hello Magento Friends,**

In our Magento 2 SOAP API Tutorial series, today I am going to illustrate How to Get Invoice Information Using SOAP API in Magento 2.
[![Hire Magento Programmer](https://magecomp.com/blog/wp-content/uploads/2025/02/Hire-Magento-Programmer-CTA-3.webp)](https://magecomp.com/services/hire-magento-programmer/)

When you need Invoice information outside of the Magento platform, you can get it using SOAP API. Sometimes you are in a need to [**create a mobile app for your website**](https://magecomp.com/magento-2-mobile-app-builder) then also there is a requirement of order information outside of your Magento store.
 Hence, you need to call SOAP API. Let’s learn further,
## Steps to Get Invoice Information Using SOAP API in Magento 2:
**Step 1:** Create **call_soap.php** file anywhere and add the following code
```
<?php

$request = new SoapClient("http://yourdomain/index.php/soap/?wsdl&services=integrationAdminTokenServiceV1", array("soap_version" => SOAP_1_2));
$token = $request->integrationAdminTokenServiceV1CreateAdminAccessToken(array("username"=>"admin2", "password"=>"admin123"));

$request = new SoapClient(
    'http://yourdomain/index.php/soap/default?wsdl&services=salesInvoiceRepositoryV1',
    array(
        'soap_version' => SOAP_1_2,
        'stream_context' => stream_context_create(array(
            'http'=> array('header' => 'Authorization: Bearer '.$token->result)
        ))
    )
);
$response = $request->SalesInvoiceRepositoryV1Get(array('id' => 2));

var_dump($response);

?>
```

## [![Magento version upgrade](https://magecomp.com/blog/wp-content/uploads/2025/02/Magento-2-Version-Upgrade-CTA-3.webp)](https://magecomp.com/services/magento-upgrade-services/)

## Conclusion:
In this manner, you can Get Invoice Information using SOAP API in Magento 2.
Also, take a look – **Get various other Information Using SOAP API in Magento 2**.
- [**Order Information**](https://magecomp.com/blog/get-order-information-using-soap-application-program-interface-magento-2)
- [**Customer Information**](https://magecomp.com/blog/get-customer-information-using-soap-application-program-interface-magento-2/)
- [**Category Information**](https://magecomp.com/blog/get-category-information-using-soap-application-program-interface-magento-2/)
- [**Product Information**](https://magecomp.com/blog/get-product-information-using-soap-application-program-interface-magento-2)

If you have any doubts, get in touch with me through the comment section. Share the tutorial with your friends and check back soon for more instructive guides on SOAP API.
[![Magento Malware Removal](https://magecomp.com/blog/wp-content/uploads/2025/02/Magento-Malware-Removal-CTA-2.webp)](https://magecomp.com/magento-malware-removal.html)

**Happy Coding!**


---

_View the original post at: [https://magecomp.com/blog/get-invoice-information-using-soap-api-magento-2/](https://magecomp.com/blog/get-invoice-information-using-soap-api-magento-2/)_  
_Served as markdown by [Third Audience](https://github.com/third-audience) v3.5.3_  
_Generated: 2026-09-13 16:14:47 UTC_  
