AutoBill.changeBillingDayOfMonth
Web Session Object
Transaction Object
Token Object
Season Set Object
Refund Object
RatePlan Object
Product Object
Payment Provider Object
Payment Method Object
NameValuePair Object
GiftCard Object
Entitlement Object
Chargeback Object
Campaign Object
BillingPlan Object
AutoBill Object
Address Object
Activity Object
Account Object
AutoBill.changeBillingDayOfMonth
The changeBillingDayOfMonth method updates the monthly billing day for a customer’s subscription, assuming that the AutoBill object that represents the subscription is in good standing. If the next AutoBill billing has not yet been processed, this method also adjusts its date.
This method is useful if monthly or yearly billing plans apply to the AutoBill object. Once you have updated the billing day with this method, subsequent billing will happen on the same day of every month or year. However, if your billing plan is in days or weeks, this method changes only the next billing date and CashBox will compute the subsequent billing dates according to the duration of your billing period.
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 monthly billing day you would like to update. You can identify this object with either its VID or your AutoBill ID (merchantAutoBillId).
dayOfMonth: the numeric day of the month (1 to 31) for the new billing. This method automatically adjusts this day for the months in which the day is not reached. For example, if dayOfMonth is 31, the billing for February occurs on either the 28th or the 29th.
Output
return: an object of type Return that indicates the success or failure of the call.
autobill: the AutoBill object whose monthly billing day was updated.
nextBillingDate: the date of the next billing, if available.
nextBillingAmount: the amount of the next billing, if available.
nextBillingCurrency: the currency of the next billing, if available.
Returns
In addition to those listed in Standard Return Codes, this call returns:
Return Code |
Return String |
400 |
One of the following:
|
Example
// to change the billing day of the month
$autobill = new AutoBill();
$autobill->setMerchantAutoBillId('xyz');
$response = $autobill->changeBillingDayOfMonth($productVid, 15);
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