GetPayments
Description
The GetPayments method retrieves a specific Payment object from the EBizCharge platform using either the customerId or customerInternalId. If neither ID is included, all Payment object will be returned.
Once a Payment has been marked as applied (by calling MarkPaymentAsApplied) then it will no longer be returned by this method.
Syntax
Payment[] GetPayments(SecurityToken securityToken, string customerId, string customerInternalId, DateTime fromDateTime, DateTime toDateTime, int start, int limit, string sort)
Arguments
Type | Name | Description | |
|---|---|---|---|
securityToken | R | A unique token that is used to identify a merchant and authenticate the API request. | |
string | customerId | O | Filters payments by the customer ID. |
string | customerInternalId | O | Filters payments by the customer internal ID. |
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. |
int | limit | R | Maximum number of objects to return. Note: Must be > 0. |
string | sort | O | Sorts by field name. Note: This field is currently unavailable. |
Return Value
Example Request
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
<soapenv:Header/>
<soapenv:Body>
<ebiz:GetPayments>
<ebiz:securityToken>
<ebiz:SecurityId>*******-90b4-4a38-ad78-********</ebiz:SecurityId>
<ebiz:UserId/>
<ebiz:Password/>
</ebiz:securityToken>
<ebiz:customerId/>
<ebiz:customerInternalId/>
<ebiz:fromDateTime>2013-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:GetPayments>
</soapenv:Body>
</soapenv: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.GetPayments(securityToken, "", "", 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);function getPayments(){
$client = new SoapClient('End point URL');
$securityToken = array
(
'SecurityId' => '********-454757-4567457-********',
'UserId' => 'merchant1',
'Password' => 'merchant1'
);
$getPayments = array(
'securityToken' => $securityToken,
'invoiceNumber' => 'in-123',
'paymentInternalId' => 21,
);
$getPaymentsResponse = $client->GetPayments($getPayments);
$getPaymentsResponseResult = $getPaymentsResponse->GetPaymentsResult;
}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">
<GetPaymentsResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
<GetPaymentsResult>
<Payment>
<CustomerId>testing-1</CustomerId>
<SubCustomerId/>
<DivisionId>0001</DivisionId>
<InvoiceNumber>test1</InvoiceNumber>
<InvoiceInternalId>*******************343442f65110</InvoiceInternalId>
<InvoiceDate>2025-11-11</InvoiceDate>
<InvoiceDueDate>2025-11-11</InvoiceDueDate>
<PoNum>PO001</PoNum>
<InvoiceAmount>1000.0000</InvoiceAmount>
<AmountDue>-803.0000</AmountDue>
<AuthCode>****539</AuthCode>
<RefNum>****2372</RefNum>
<Last4>1111</Last4>
<PaymentMethod>Visa</PaymentMethod>
<DatePaid>2025-11-26T19:39:13</DatePaid>
<PaidAmount>0.0000</PaidAmount>
<PaymentInternalId>**********************453z45564ee25</PaymentInternalId>
<CustNum>73904925</CustNum>
<PaymentMethodId/>
<PaymentType>InvoicePayment</PaymentType>
<TypeId>Invoice</TypeId>
<PaymentSourceId>Custom Integration</PaymentSourceId>
</Payment>
<Payment>
<CustomerId>testing-1</CustomerId>
<SubCustomerId/>
<DivisionId>0001</DivisionId>
<InvoiceNumber>test1</InvoiceNumber>
<InvoiceInternalId>********************d42f65110</InvoiceInternalId>
<InvoiceDate>2025-11-11</InvoiceDate>
<InvoiceDueDate>2025-11-11</InvoiceDueDate>
<PoNum>PO001</PoNum>
<InvoiceAmount>1000.0000</InvoiceAmount>
<AmountDue>-803.0000</AmountDue>
<AuthCode>****539</AuthCode>
<RefNum>*******4672</RefNum>
<Last4>1111</Last4>
<PaymentMethod>Visa</PaymentMethod>
<DatePaid>2025-11-26T19:28:43</DatePaid>
<PaidAmount>0.0000</PaidAmount>
<PaymentInternalId>*******************bde1b0</PaymentInternalId>
<CustNum>****4925</CustNum>
<PaymentMethodId/>
<PaymentType>InvoicePayment</PaymentType>
<TypeId>Invoice</TypeId>
<PaymentSourceId>Custom Integration</PaymentSourceId>
</Payment>
</GetPaymentsResult>
</GetPaymentsResponse>
</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">The conversion of a nvarchar data type to a datetime data type resulted in an out-of-range value.</faultstring>
</s:Fault>
</s:Body>
</s:Envelope>Updated 5 months ago
