AutoBill.fetchFutureRebills
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.fetchFutureRebills
The fetchFutureRebills method returns the planned future billing transactions, that do not yet exist in CashBox, for the specified AutoBill object. The returned Transaction objects are constructed on the fly in response to this call. You can then inform a customer how they will be billed for a subscription to your product or service with a certain billing plan.
(This method will calculate and return any discounts applied as a result of an applied Campaign Code.)
For this call to succeed, the AutoBill object must be in an actively billing state.
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 for which to obtain the future billing transactions. Identify this object with either its VID or merchantAutoBillId.
quantity: the number of future rebill transactions to be returned by this call. This input must be a positive integer.
Output
return: an object of type Return that indicates the success or failure of the call.
transactions: an array of Transaction objects, each of which corresponds to a projected billing for this AutoBill object. For for information, see The Transaction Object.
Returns
In addition to those listed in Standard Return Codes, this call returns:
Return Code |
Return String |
400 |
One of the following:
|
404 |
No matching AutoBill found. |
405 |
AutoBill is in an inactive state <state>. |
Example
$autobillVid = 'a209408014a33fec3dcd4a3339d78efc33603bfe';
// Create an autobill object
$autobill = new AutoBill();
$autobill->setVID($autobillVid);
$response = $autobill->fetchFutureRebills(5);
if($response['returnCode'] == 200) {
$futureTxns = $response['data']->transactions;
print "This subscription will be billed at the following dates and amounts:\n";
for ($i = 0; $i < 5; $i++) {
print "Date: " . $futureTxns[i]->getTimestamp() . " ";
print "Amount: " . $futureTxns[i]->getAmount() . "\n";
}
}
For Users
Learn More