GetInvoicePayments

Description

This method allows you to search the payments database during a certain period of time using the invoice number or invoiceInternalId (assigned by EBizCharge Connect).

Syntax

Payment[] GetInvoicePayments(SecurityToken securityToken, string customerId, string customerInternalId, string invoiceNumber, string invoiceInternalId, DateTime fromDateTime, DateTime toDateTime, int start, int limit, string sort)

Arguments

Type

Name

Description

SecurityToken

securityToken

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

string

customerId

Customer ID. (required)

string

customerInternalId

Unique customer ID assigned by the internal system. (required)

string

invoiceNumber

Invoice number. (required)

string

invoiceInternalId

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

DateTime

fromDateTime

From payment date. (required)

DateTime

toDateTime

To payment date. (required)

int

start

Start position, defaults to 0 (first payment found). (required)

int

limit

Maximum number of payments to return in result. (required)

string

sort

Field name to sort the results by. (optional)

Return Value

Type

Description

Payment[]

This object contains all payment information, including payment, invoice, and customer information.

Examples

var client = new EBizSOAP.IeBizServiceClient();
EBizSOAP.SecurityToken securityToken = new EBizSOAP.SecurityToken();
securityToken.UserId = "";
securityToken.SecurityId = "1dc496d1-90b4-4a38-ad78-28a795af78e9";
securityToken.Password = "";
EBizSOAP.Payment[] payments = client.GetInvoicePayments(securityToken,"", "", "1010120", "", DateTime.Parse("("03/03/2016 00:00:00""), DateTime.Parse("03/03/2016 23:59:59"), 0, 100, "");

Console.WriteLine(payments[0].CustomerId);
Console.WriteLine(payments[0].InvoiceNumber);
Console.WriteLine(payments[0].PaymentMethod);
Console.WriteLine(payments[0].PaidAmount);
Console.WriteLine(payments[0].RefNum);
Console.WriteLine(payments[0].Last4);
Console.WriteLine(payments[0].AmountDue);
Request:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
   <soapenv:Header/>
   <soapenv:Body>
      <ebiz:GetInvoicePayments>
         <ebiz:securityToken>
            <ebiz:SecurityId>1dc496d1-90b4-4a38-ad78-28a795af78e9</ebiz:SecurityId>
            <ebiz:UserId/>
            <ebiz:Password/>
         </ebiz:securityToken>
         <ebiz:customerId/>
         <ebiz:customerInternalId/>
         <ebiz:invoiceNumber>112008158</ebiz:invoiceNumber>
         <ebiz:invoiceInternalId>
</ebiz:invoiceInternalId>
         <ebiz:fromDateTime>2010-12-21T03:32:42-08:00</ebiz:fromDateTime>
         <ebiz:toDateTime>2016-01-01T11:07:42</ebiz:toDateTime>
         <ebiz:start>0</ebiz:start>
         <ebiz:limit>3</ebiz:limit>
         <ebiz:sort/>
      </ebiz:GetInvoicePayments>
   </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">
      <GetInvoicePaymentsResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
         <GetInvoicePaymentsResult>
            <Payment>
               <CustomerId>SP0115</CustomerId>
               <SubCustomerId>S01743</SubCustomerId>
               <DivisionId>001</DivisionId>
               <InvoiceNumber>112008158</InvoiceNumber>
               <InvoiceInternalId>bc0c2e4b-796b-4350-b39c-dfb2bbb1f590</InvoiceInternalId>
               <InvoiceDate>2013-01-21</InvoiceDate>
               <InvoiceDueDate>2013-02-20</InvoiceDueDate>
               <PoNum>&amp;nbsp;</PoNum>
               <InvoiceAmount>-2346.2200</InvoiceAmount>
               <AmountDue>-3013.7200</AmountDue>
               <AuthCode>273046</AuthCode>
               <RefNum>62158562</RefNum>
               <Last4>1111</Last4>
               <PaymentMethod>Visa</PaymentMethod>
               <DatePaid>2015-02-25T05:34:04</DatePaid>
               <PaidAmount>0.2200</PaidAmount>
               <PaymentInternalId>818db1ea-95b3-4b6d-a7a7-3029842c48ac</PaymentInternalId>
            </Payment>
            <Payment>
               <CustomerId>SP0115</CustomerId>
               <SubCustomerId>S01743</SubCustomerId>
               <DivisionId>001</DivisionId>
               <InvoiceNumber>112008158</InvoiceNumber>
               <InvoiceInternalId>bc0c2e4b-796b-4350-b39c-dfb2bbb1f590</InvoiceInternalId>
               <InvoiceDate>2013-01-21</InvoiceDate>
               <InvoiceDueDate>2013-02-20</InvoiceDueDate>
               <PoNum>&amp;nbsp;</PoNum>
               <InvoiceAmount>-2346.2200</InvoiceAmount>
               <AmountDue>-3013.7200</AmountDue>
               <AuthCode>300235</AuthCode>
               <RefNum>62213422</RefNum>
               <Last4>1111</Last4>
               <PaymentMethod>Visa</PaymentMethod>
               <DatePaid>2015-02-25T17:27:21</DatePaid>
               <PaidAmount>5.0000</PaidAmount>
               <PaymentInternalId>41426971-771a-42c4-a5bb-16d9167f6605</PaymentInternalId>
            </Payment>
            <Payment>
               <CustomerId>SP0115</CustomerId>
               <SubCustomerId>S01743</SubCustomerId>
               <DivisionId>001</DivisionId>
               <InvoiceNumber>112008158</InvoiceNumber>
               <InvoiceInternalId>bc0c2e4b-796b-4350-b39c-dfb2bbb1f590</InvoiceInternalId>
               <InvoiceDate>2013-01-21</InvoiceDate>
               <InvoiceDueDate>2013-02-20</InvoiceDueDate>
               <PoNum>&amp;nbsp;</PoNum>
               <InvoiceAmount>-2346.2200</InvoiceAmount>
               <AmountDue>-3013.7200</AmountDue>
               <AuthCode>315415</AuthCode>
               <RefNum>62244676</RefNum>
               <Last4>1111</Last4>
               <PaymentMethod>Visa</PaymentMethod>
               <DatePaid>2015-02-26T03:10:11</DatePaid>
               <PaidAmount>1.0000</PaidAmount>
               <PaymentInternalId>5bdc41b8-2a24-4943-83a7-93ee26a30f66</PaymentInternalId>
            </Payment>
         </GetInvoicePaymentsResult>
      </GetInvoicePaymentsResponse>
   </s:Body>
</s:Envelope>