Skip to main content
Use AutoBill.addCampaign to add a Campaign Code to an existing AutoBill. Add a Campaign Code to an existing AutoBill: First, create the AutoBill:
Note: This example neither validates the Payment Method, nor checks the chargeback probability or AVS and CVN returns. The default behavior for duplicateBehavior is used. These parameters must be populated, simply to set a variable for the last in the sequence (ignoreAvsPolicy). To attach the Campaign Code, use AutoBill.update, or AutoBill.addCampaign. (AutoBill.addCampaign works similarly to AutoBill.update when adding a Campaign Code to an existing AutoBill.)
If there is an error with the discount, Subscribe will not process the AutoBill.update, and will return an error code of 400, with a text string explanation. The error may be that no Product or Billing Plan on the AutoBill is eligible for the Promotion, or that the Coupon Code has already been used against its defined number of AutoBills, or that the Promotion Code is out of date.Applying a Campaign Code to a Specific Product on an AutoBill Parent topic:Adding a Campaign Code to an AutoBill