GetRecurringSchedulePreview

Description

The GetRecurringSchedulePreview method returns a preview for a recurring billing schedule, generating billing dates based on the parameters included in the request.

Syntax

GetScheduledDatesResponse GetRecurringSchedulePreview(SecurityToken securityToken, RecurringBilling recurringBilling)

Arguments

Type

Name

Req.

Description

SecurityToken

securityToken

R

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

RecurringBilling

recurringBilling

R

Specifies the start date, expiration date, and frequency of the recurring billing schedule.

Required Fields
  • Start
  • Expire
  • Schedule

Return Value

TypeDescription
GetScheduledDatesResponseScheduled dates based on the provided recurring billing details. If an error occurs, a fault is returned.

Example Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ebiz="http://eBizCharge.ServiceModel.SOAP">
   <soapenv:Header/>
   <soapenv:Body>
      <ebiz:GetRecurringSchedulePreview>
         <ebiz:securityToken>
            <ebiz:SecurityId>************4621-b899************</ebiz:SecurityId>
            <ebiz:UserId/>
            <ebiz:Password/>
         </ebiz:securityToken>
         <ebiz:recurringBilling>
            <ebiz:Start>2013-11-13T00:00:00</ebiz:Start>
            <ebiz:Expire>2021-02-21T00:00:00</ebiz:Expire>
            <ebiz:Schedule>monthly</ebiz:Schedule>
         </ebiz:recurringBilling>
      </ebiz:GetRecurringSchedulePreview>
   </soapenv:Body>
</soapenv:Envelope>
var client = new IeBizServiceClient();

//SharbelSB security token
SecurityToken securityToken = new SecurityToken();
securityToken.UserId = "";
securityToken.SecurityId = "************421b-86ce************";
securityToken.Password = "";

RecurringBilling recurringBilling = new RecurringBilling();
recurringBilling.Amount = 10;
recurringBilling.Start = new DateTime(2026, 1, 28);
recurringBilling.Expire = new DateTime(2026, 7, 28);
recurringBilling.Schedule = "monthly";
recurringBilling.Next = new DateTime(2026, 1, 28);
GetScheduledDatesResponse response = client.GetRecurringSchedulePreview(securityToken, recurringBilling);
$client = new SoapClient('End Point URL');
$securityToken = array(
        'SecurityId' => '************421b-86ce************',
        'UserId' => 'merchant1',
        'Password' => 'merchant1'
);
$params = array(
    'securityToken' => $securityToken,
    'recurringBilling' => array(
        'Amount' => 10.00,
        'Start' => '2021-07-07T00:00:00',
        'Next' => '2022-01-01T00:00:00',
        'Expire' => '2031-07-07T00:00:00',
        'Schedule' => 'Monthly'
    )
);
$previewResponse = $client->getRecurringSchedulePreview($params);

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">
      <GetRecurringSchedulePreviewResponse xmlns="http://eBizCharge.ServiceModel.SOAP">
         <GetRecurringSchedulePreviewResult>
            <ScheduledDates>["2020-11-13","2020-12-13","2021-01-13","2021-02-13"]</ScheduledDates>
            <Status>Success</Status>
            <StatusCode>1</StatusCode>
            <Error/>
            <ErrorCode>0</ErrorCode>
         </GetRecurringSchedulePreviewResult>
      </GetRecurringSchedulePreviewResponse>
   </s:Body>
</s:Envelope>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <s:Fault>
         <faultcode>s:InvalidSchedule</faultcode>
         <faultstring xml:lang="en-US">Invalid Schedule</faultstring>
      </s:Fault>
   </s:Body>
</s:Envelope>