Skip to main content
Vindicia Knowledge Center

AutoBill.delayBillingToDate

AutoBill.delayBillingToDate

AutoBill.delayBillingToDate

The delayBillingToDate method is similar to delayBillingByDays but delays the next billing for an AutoBill object until the specified date. Instead of specifying the number of days for the delay, you specify the exact date on which you would like the next billing to occur.

Input

srd: sparse response description, a SOAP string (which must be a JSON object), in which you specify the elements you want returned.This parameter enables the calling system to constrain a method call to return only components you specify. This gives you greater control over returned content, and improves response time within the Vindicia platform by reducing the processing needed for the call.

Some fields are required, either practically or in the WSDL, and will be returned regardless of the srd. A null srd returns the complete response.

autobill: the AutoBill object whose billing to delay. Identify this object by populating it with its VID or merchantAutoBillId.

newBillingDate: the date until which to delay billing.

movePermanently: when set to true, makes the altered billing date change permanent for all subsequent billings.

Output

return: an object of type Return that indicates the success or failure of the call.

autobill: the AutoBill object whose billing was delayed to the specified date.

nextBillingDate: the date of the next billing.

nextBillingAmount: the amount of the next billing.

nextBillingCurrency: the currency of the next billing.

Returns

In addition to those listed in Standard Return Codes, this call returns:

Return Code

Return String

400

One of the following:

  • Must specify AutoBill to delay billing for.
  • Date to delay to must be specified and have a length.
  • Unable to delay billing to date: internal-error.

Example

// to delay billing to a specified date

$autobill = new AutoBill();
$autobill->setMerchantAutoBillId('xyz');

$darray = getdate();
$day = $darray[mday];
$year = $darray[year];
$mon = $darray[mon] + 6;
if ($mon > 12) {

$year++;
$mon -= 12;

}

$timestamp = mktime(0, 0, 0, $mon, $day, $year);

$response = $autobill->delayBillingToDate($timestamp, true);

if($response['returnCode'] == 200) {

$nextBillingDate = $response['nextBillingDate'];
$nextBillingAmt = $response['nextBillingAmount'];

print "Customer will be billed on " . $nextBillingDate.

" for US $" . $nextBillingAmt . "\n";

}

For Users

Learn More
For Users

Cashbox Features

Learn More
Cashbox Features
Back to Top