GetInvoicePayments

Description

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

Syntax

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

Arguments

TypeNameDescription
SecurityToken securityTokenMerchant security token: used to identify merchant and validate transaction. (required)
stringcustomerIdCustomer ID. (required)
stringcustomerInternalIdUnique customer ID assigned by the internal system. (required)
stringinvoiceNumberInvoice number. (required)
stringinvoiceInternalIdUnique invoice ID assigned by the internal system. (required)
DateTimefromDateTimeFrom payment date. (required)
DateTimetoDateTimeTo payment date. (required)
intstartStart position, defaults to 0 (first payment found). (required)
intlimitMaximum number of payments to return in result. (required)
stringsortField name to sort the results by. (optional)

Return Value

TypeDescription
Payment[]This object contains all payment information, including payment, invoice, and customer information.

Examples

public function GetInvoicePayments()
{
 $client = new SoapClient('End point URL');
 $securityToken = array(
 'SecurityId' => '******-454757-4567457-********',
 'UserId' => 'merchant1',
 'Password' => 'merchant1'
);
 $response = $client->GetInvoicePayments( array(
 'securityToken' => $securityToken,
 'customerId' => '1',
 'fromDateTime' => '2021-01-09',
 'toDateTime' => '2022-04-09',
 'start' => 0,
 'limit' => 100,
 ));
 $invoices = $response->GetInvoicePaymentsResult;
}
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>********-90b4-4a38-ad78-********</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>********-796b-4350-b39c-********</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>********-95b3-4b6d-a7a7-********</PaymentInternalId>
            </Payment>
            <Payment>
               <CustomerId>SP0115</CustomerId>
               <SubCustomerId>S01743</SubCustomerId>
               <DivisionId>001</DivisionId>
               <InvoiceNumber>112008158</InvoiceNumber>
               <InvoiceInternalId>********-796b-4350-b39c-********</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>********-771a-42c4-a5bb-********</PaymentInternalId>
            </Payment>
            <Payment>
               <CustomerId>SP0115</CustomerId>
               <SubCustomerId>S01743</SubCustomerId>
               <DivisionId>001</DivisionId>
               <InvoiceNumber>112008158</InvoiceNumber>
               <InvoiceInternalId>********-796b-4350-b39c-********</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>********-2a24-4943-83a7-********</PaymentInternalId>
            </Payment>
         </GetInvoicePaymentsResult>
      </GetInvoicePaymentsResponse>
   </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.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);