Skip to main content
Vindicia Knowledge Center




The addCampaign method allows you to add a Campaign to an existing AutoBill.

This method will automatically validate the Campaign, and its eligibility, before adding the Campaign, and updating the AutoBill, and will not change the billing date for the AutoBill.

Note If neither product nor item is passed in with this call, CashBox will apply the Campaign discount to all eligible items on the AutoBill.


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 object of type AutoBill to which this Campaign should be added.

product: an array of Products to which the Campaign discount should be applied. (This product must already exist in CashBox.) The discount will be applied to any AutoBillItem on the specified AutoBill that includes this product. Specify either item or product; but not both. (Optional.)

item: the AutoBillItem to which the Campaign discount should be applied. This item must already exist in CashBox and be associated with the specified AutoBill. Specify either item or product; but not both. (Optional.)

applyToBillingPlan: a Boolean flag that, if set to true, will apply the Campaign to the BillingPlan on the AutoBill. (May be combined with a discounted AutoBillItem.) Default is false.

campaignCode: the Coupon or Promotion Code used to obtain a discount on the AutoBill. (Required.)

dryrun: a Boolean flag that, if set to true, will return the updated AutoBill, without recording the result in the CashBox database. Use this method to compute the cost of an AutoBill without committing the change. (The projected billing amount will be returned in the Transaction object of the nextBillingdata member of the returned AutoBill.)

If the AutoBill did not exist before, it will not exist afterward; if it did exist before, it will not change. (No payment method validations, authorizations or charges will be performed if dryrun is true.)


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

autobill: the updated AutoBill.


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

Return Code

Return String


One of the following:

  • AutoBill not found.
  • Campaign code input-campaignCode is not usable.
  • Must specify a campaignCode with addCampaign.


$autobill = new AutoBill();

$autobill->setMerchantAutoBillId($abID); // for some $abID
$response = $autobill->addCampaign(



// check $response

For Users

Learn More
For Users

Vindicia Subscribe Features

Learn More
Vindicia Subscribe Features
Back to Top