MarkPaymentAsApplied

Description

The MarkPaymentAsApplied method marks a payment as applied. Once applied, the payment is excluded from the list of Payment objects returned by GetPayments .

Syntax

PaymentResponse MarkPaymentAsApplied(SecurityToken securityToken, string invoiceNumber, string paymentInternalId)

Arguments

TypeNameReq.Description
SecurityToken securityTokenRA unique token that is used to identify a merchant and authenticate the API request.
stringinvoiceNumberRIdentifies the Invoice associated with the payment.
stringpaymentInternalIdRInternal ID of the Payment to mark as applied.

Return Value

TypeDescription
PaymentResponseIndicates whether the Payment was successfully marked as applied.

Example Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
   <soapenv:Header/>
   <soapenv:Body>
      <ebiz:MarkPaymentAsApplied>
         <ebiz:securityToken>
            <ebiz:SecurityId>*************-4621-b899-************</ebiz:SecurityId>
            <ebiz:UserId/>
            <ebiz:Password/>
         </ebiz:securityToken>
         <ebiz:invoiceNumber>INV-001</ebiz:invoiceNumber>
         <ebiz:paymentInternalId>*************-4d49-828b-************</ebiz:paymentInternalId>
      </ebiz:MarkPaymentAsApplied>
   </soapenv:Body>
</soapenv:Envelope>
public void markPaymentAsApplied()
{
  eBizService apiClient = new eBizService();
  SecurityToken securityToken = new SecurityToken
  {
    SecurityId = "********-90b4-4a38-ad78-********",
    UserId = "",
    Password = ""
    };
  var Response = apiClient.MarkPaymentAsApplied(securityToken, "00102565", "********-b521-4ef6-9456-********");
  Console.WriteLine(Response.Status);
  Console.WriteLine(Response.StatusCode);
  Console.WriteLine(Response.Error);
  Console.WriteLine(Response.ErrorCode);
}
function markPaymentAsApplied(){
  $client = new SoapClient('End point URL');
  $securityToken = array(
    'SecurityId' => '******-454757-4567457-********',
    'UserId' => 'merchant1',
    'Password' => 'merchant1'
  );
  $markPaymentAsApplied = array(
    'securityToken' => $securityToken,
    'invoiceNumber' => 'in-123',
    'paymentInternalId' => 21,
  );
  $markPaymentAsAppliedResponse = $client->MarkPaymentAsApplied($markPaymentAsApplied);
  $markPaymentAsAppliedResponseResult = $markPaymentAsAppliedResponse->MarkPaymentAsAppliedResult;
}

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">
      <MarkPaymentAsAppliedResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
         <MarkPaymentAsAppliedResult>
            <Status>Success</Status>
            <StatusCode>1</StatusCode>
            <Error/>
            <ErrorCode>0</ErrorCode>
         </MarkPaymentAsAppliedResult>
      </MarkPaymentAsAppliedResponse>
   </s:Body>
</s:Envelope>
<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">
      <MarkPaymentAsAppliedResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
         <MarkPaymentAsAppliedResult>
            <Status>Error</Status>
            <StatusCode>0</StatusCode>
            <Error>Not Found</Error>
            <ErrorCode>3</ErrorCode>
         </MarkPaymentAsAppliedResult>
      </MarkPaymentAsAppliedResponse>
   </s:Body>
</s:Envelope>