GetInvoice

Description

This method allows users to get invoices from the database using the specific Invoice Number and Customer Id.

Syntax

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

Arguments

Type

Name

Description

SecurityToken

securityToken

Merchant security token: used to identify merchant and validate transaction. (required)

string

customerId

Customer Id. (required)

string

subCustomerId

Sub-customer Id. (optional)

string

invoiceNumber

Invoice number. (required)

string

invoiceInternalId

Unique invoice Id assigned by the internal system. (required)

Return Value

Type

Description

Invoice

Returns invoice information, such as invoice amount, amount due, invoice date, and other pertinent information.

Examples

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;
}
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>********-90b4-4a38-ad78-**********</ebiz:SecurityId>
            <ebiz:UserId/>
            <ebiz:Password/>
         </ebiz:securityTokenCustomer>
         <ebiz:customerId>SP0115</ebiz:customerId>
         <ebiz:subCustomerId>S01743</ebiz:subCustomerId>
         <ebiz:invoiceNumber>112008122</ebiz:invoiceNumber>
         <ebiz:invoiceInternalId/>
      </ebiz:GetInvoice>
   </soapenv:Body>
</soapenv:Envelope>


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>SP0115</CustomerId>
            <SubCustomerId>S01743</SubCustomerId>
            <InvoiceNumber>113224435</InvoiceNumber>
            <InvoiceInternalId>********-dc33-4575-abf8-********</InvoiceInternalId>
            <InvoiceDate>2013-01-02</InvoiceDate>
            <Currency>USD</Currency>
            <InvoiceAmount>659.9600</InvoiceAmount>
            <InvoiceDueDate>2013-02-01</InvoiceDueDate>
            <AmountDue>-3.0000</AmountDue>
            <PoNum/>
            <SoNum/>
            <DivisionId>001</DivisionId>
            <Software/>
            <NotifyCustomer>false</NotifyCustomer>
         </GetInvoiceResult>
      </GetInvoiceResponse>
   </s:Body>
</s:Envelope>
var client = new EBizSOAP.IeBizServiceClient();
EBizSOAP.SecurityToken securityToken = new EBizSOAP.SecurityToken();
securityToken.UserId = "";
securityToken.SecurityId = "********-90b4-4a38-ad78-********";
securityToken.Password = "";
EBizSOAP.Invoice invoice= client.GetInvoice(securityToken, "101010", "1001", "INV4125412", "");
Console.WriteLine(invoice.InvoiceNumber);
Console.WriteLine(invoice.InvoiceDate);
Console.WriteLine(invoice.AmountDue);
Console.WriteLine(invoice.InvoiceDueDate);