GetInvoice

Description

The GetInvoice method retrieves an existing Invoice from the EBizCharge platform.

Syntax

Invoice GetInvoice(SecurityToken securityTokenCustomer, string customerId, string subCustomerId, string invoiceNumber, string invoiceInternalId)

Arguments

Type

Name

Req.

Description

SecurityToken

securityToken

R

A unique token that is used to identify a merchant and authenticate the API request.

string

customerId

D

Identifies the Customer associated with the invoice.

Note: Required if the existing object contains a customerId and invoiceInternalId is not sent.

string

subCustomerId

D

Identifies the SubCustomer associated with the invoice.

Note: Required if the existing object contains a subCustomerId and invoiceInternalId is not sent.

string

invoiceNumber

D

Identifies the invoice to retrieve.

Note: Required if the existing object contains an invoiceNumber and invoiceInternalId is not sent.

string

invoiceInternalId

D

Identifies the invoice to retrieve.

Note: Required if invoiceNumber is not sent.

Return Value

TypeDescription
InvoiceOn success, returns the requested invoice. Otherwise, a fault is returned.

Example Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
   <soapenv:Header/>
   <soapenv:Body>
      <ebiz:GetInvoice>
         <ebiz:securityTokenCustomer>
            <ebiz:SecurityId>*************-4621-b899-************</ebiz:SecurityId>
            <ebiz:UserId/>
            <ebiz:Password/>
         </ebiz:securityTokenCustomer>
         <ebiz:customerId>CBS</ebiz:customerId>
         <ebiz:subCustomerId/>
         <ebiz:invoiceNumber>INV-001</ebiz:invoiceNumber>
         <ebiz:invoiceInternalId/>
      </ebiz:GetInvoice>
   </soapenv:Body>
</soapenv:Envelope>
EBizSOAP.SecurityToken securityToken = new EBizSOAP.SecurityToken();
securityToken.UserId = "";
securityToken.SecurityId = "********-90b4-4a38-ad78-********";
securityToken.Password = "";
string customerId = "101010";
string subCustomerId = "1001";
string invoiceNumber = "INV4125412";
string invoiceInternalId = "********-2356-1246-8679-************"; 

EBizSOAP.Invoice invoice= client.GetInvoice(securityToken, customerId, subCustomerId, invoiceNumber, invoiceInternalId);

Console.WriteLine(invoice.InvoiceNumber);
Console.WriteLine(invoice.InvoiceDate);
Console.WriteLine(invoice.AmountDue);
Console.WriteLine(invoice.InvoiceDueDate);
public function GetInvoice()
{
  $client = new SoapClient('End point URL');
  $securityToken = array(
    'SecurityId' => '******-454757-*******-777',
    'UserId' => 'merchant1',
    'Password' => 'merchant1'
  );
  $response = $client->GetInvoice(array(
    'securityToken' => $securityToken,
    'customerId' => '123',
    'invoiceNumber' => '00102566'
  ));
  $result = $response->GetInvoiceResult;
}

Example Response

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <GetInvoiceResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
         <GetInvoiceResult>
            <CustomerId>CBS</CustomerId>
            <SubCustomerId></SubCustomerId>
            <InvoiceNumber>INV-001</InvoiceNumber>
            <InvoiceInternalId>*************-4d2a-ae98-************</InvoiceInternalId>
            <InvoiceDate>1900-01-01</InvoiceDate>
            <Currency></Currency>
            <InvoiceAmount>95.0000</InvoiceAmount>
            <InvoiceDueDate>1900-01-01</InvoiceDueDate>
            <AmountDue>22.0000</AmountDue>
            <PoNum></PoNum>
            <SoNum></SoNum>
            <DivisionId></DivisionId>
            <DateUploaded>2025-11-11T00:48:50</DateUploaded>
            <DateUpdated>2025-12-09T23:13:52</DateUpdated>
            <Items/>
            <Software></Software>
            <NotifyCustomer>false</NotifyCustomer>
            <InvoiceURL/>
            <TotalTaxAmount>0.0000</TotalTaxAmount>
            <InvoiceUniqueId/>
            <InvoiceDescription/>
            <BillingAddress>
               <FirstName/>
               <LastName/>
               <CompanyName/>
               <Address1/>
               <Address2/>
               <City/>
               <State/>
               <ZipCode/>
               <Country/>
               <IsDefault>false</IsDefault>
               <AddressId/>
            </BillingAddress>
            <ShippingAddress>
               <FirstName/>
               <LastName/>
               <CompanyName/>
               <Address1/>
               <Address2/>
               <City/>
               <State/>
               <ZipCode/>
               <Country/>
               <IsDefault>false</IsDefault>
               <AddressId/>
            </ShippingAddress>
            <InvoiceCustomerMessage/>
            <InvoiceMemo/>
            <InvoiceShipDate>1/1/1900 12:00:00 AM</InvoiceShipDate>
            <InvoiceShipVia/>
            <InvoiceIsToBeEmailed>false</InvoiceIsToBeEmailed>
            <InvoiceIsToBePrinted>false</InvoiceIsToBePrinted>
            <DeliveryNumber/>
            <TotalDiscountAmount>0.0000</TotalDiscountAmount>
            <TotalShippingAmount>0.0000</TotalShippingAmount>
            <LocationId/>
            <RemitToAddress>
               <FirstName/>
               <LastName/>
               <CompanyName/>
               <Address1/>
               <Address2/>
               <City/>
               <State/>
               <ZipCode/>
               <Country/>
               <IsDefault>false</IsDefault>
               <AddressId/>
            </RemitToAddress>
            <PoDate>1900-01-01</PoDate>
            <OrderedBy/>
            <InvoiceClass/>
            <InvoiceFOB/>
            <InvoiceTermsDescription/>
            <InvoiceCustomFields>
               <EbizCustomField>
                  <FieldId/>
                  <FieldCaption/>
                  <FieldName/>
                  <FieldValue/>
                  <FieldType/>
                  <FieldDataType/>
                  <FieldDescription/>
               </EbizCustomField>
            </InvoiceCustomFields>
         </GetInvoiceResult>
      </GetInvoiceResponse>
   </s:Body>
</s:Envelope>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <s:Fault>
         <faultcode>s:NotFound</faultcode>
         <faultstring xml:lang="en-US">Not Found</faultstring>
      </s:Fault>
   </s:Body>
</s:Envelope>