GetInvoicePayments

Description

The GetInvoicePayments method retrieves a list of paid invoice payments within a specified date range.

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

Req.

Description

SecurityToken

securityToken

R

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

string

customerId

O

Filters payments by the custom ID of the Customer.

string

customerInternalId

O

Filters payments by the internal ID of the Customer.

string

invoiceNumber

O

Filters payments by custom ID of the Invoice.

string

invoiceInternalId

O

Filters payments by internal ID of the Invoice.

DateTime

fromDateTime

R

Only includes payments after this date.

Note: YYYY-MM-DD

DateTime

toDateTime

R

Only includes payments before this date.

Note: YYYY-MM-DD

int

start

R

Index of the first object to return in the array.

Note: Must be ≥ 0.

int

limit

R

Maximum number of objects to return.

Note: Must be > 0.

string

sort

O

Sorts by field name.

Supported Sort Parameters
  • InvoiceNumber
  • AmountDue
  • AuthCode
  • RefNum
  • Last4
  • PaidAmount
  • PaymentType

Return Value

TypeDescription
Payment[]On success, returns an array of Payment objects that match the provided filters. Otherwise, returns a fault.

Example 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>*******21-b899-9301b******</ebiz:SecurityId>
            <ebiz:UserId/>
            <ebiz:Password/>
         </ebiz:securityToken>
         <ebiz:customerId/>
         <ebiz:customerInternalId/>
         <ebiz:invoiceNumber/>
         <ebiz:invoiceInternalId>************343-af31-67a4***********</ebiz:invoiceInternalId>
         <ebiz:fromDateTime>2024-12-02</ebiz:fromDateTime>
         <ebiz:toDateTime>2026-01-30</ebiz:toDateTime>
         <ebiz:start>0</ebiz:start>
         <ebiz:limit>100</ebiz:limit>
         <ebiz:sort/>
      </ebiz:GetInvoicePayments>
   </soapenv:Body>
</soapenv:Envelope>
IeBizServiceClient client = new IeBizServiceClient();

// Set the SecurityToken credentials
SecurityToken securityToken = new SecurityToken
{
  SecurityId = "********-90b4-4a38-ad78-********",
  UserId = "*****",
  Password = "*****"
  };

// Get Payment array of historical payments matching the query
Payment[] payments = client.GetInvoicePayments(securityToken, "", "", "", "", DateTime.Parse("03/03/2025 00:00:00"), DateTime.Now.AddDays(1), 0, 1000, "");

// Output returned payment info
Console.WriteLine($"Payments Returned: {payments.Length}");
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;
}

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">
      <GetInvoicePaymentsResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
         <GetInvoicePaymentsResult>
            <Payment>
               <CustomerId>test-customer</CustomerId>
               <SubCustomerId>3</SubCustomerId>
               <DivisionId>0001</DivisionId>
               <InvoiceNumber>Invoice-103</InvoiceNumber>
               <InvoiceInternalId>************343-af31-67a4***********</InvoiceInternalId>
               <InvoiceDate>2025-07-30</InvoiceDate>
               <InvoiceDueDate>2025-07-30</InvoiceDueDate>
               <PoNum>PO001</PoNum>
               <InvoiceAmount>2000.0000</InvoiceAmount>
               <AmountDue>0.0000</AmountDue>
               <AuthCode>*****</AuthCode>
               <RefNum>*********</RefNum>
               <Last4>2223</Last4>
               <PaymentMethod>Visa</PaymentMethod>
               <DatePaid>2025-10-30T18:28:50</DatePaid>
               <PaidAmount>50.0000</PaidAmount>
               <PaymentInternalId>***************e50-b165-a5bb2***************</PaymentInternalId>
               <PaymentMethodId>4</PaymentMethodId>
               <PaymentType>InvoicePayment</PaymentType>
               <TypeId>Invoice</TypeId>
            </Payment>
         </GetInvoicePaymentsResult>
      </GetInvoicePaymentsResponse>
   </s:Body>
</s:Envelope>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <s:Fault>
         <faultcode>s:Client</faultcode>
         <faultstring xml:lang="en-US">Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).</faultstring>
      </s:Fault>
   </s:Body>
</s:Envelope>