updateSubscription
The updateSubscription
element is the parent element for the transaction that updates the subscription information associated with a recurring payment. Using this transaction type you can change the plan, card, billing information, and/or billing date. You can also create, update, or delete a Discount and/or an Add On.
Parent Elements:
cnpOnlineRequest, batchRequest
Attributes:
None
Child Elements:
Required: subscriptionId
Optional: planCode, billToAddress, (choice of) card, paypage, or token, billingDate, createDiscount, deleteDiscount, updateDiscount, createAddOn, updateAddOn, deleteAddOn
Example: updateSubscription - Change Plan
<updateSubscription>
<subscriptionId>Subscription Id</subscriptionId>
<planCode>New Plan Code</planCode>
</updateSubscription>
Example: updateSubscription - Change Card
<updateSubscription>
<subscriptionId>Subscription Id</subscriptionId>
<card>
<type>Card Type Abbreviation</type>
<number>Account Number</number>
<expDate>Expiration Date</expDate>
</card>
</updateSubscription>
Example: updateSubscription - Change Billing Date
<updateSubscription>
<subscriptionId>Subscription Id</subscriptionId>
<billingDate>New Billing Date</billingDate>
</updateSubscription>
Example: updateSubscription - Change Billing Info
<updateSubscription>
<subscriptionId>Subscription Id</subscriptionId>
<billToAddress>
<name>Customer’s Full Name</name>
<companyName>Company’s Name</companyName>
<addressLine1>Address Line 1</addressLine1>
<addressLine2>Address Line 2</addressLine2>
<addressLine3>Address Line 3</addressLine3>
<city>City</city>
<state>State Abbreviation</state>
<zip>Postal Code</zip>
<country>Country Code</country>
<email>Email Address</email>
<phone>Telephone Number</phone>
</billToAddress>
</updateSubscription>
Example: updateSubscription - Create Discount
<updateSubscription>
<subscriptionId>Subscription Id</subscriptionId>
<createDiscount>
<discountCode>Discount Reference Code</discountCode>
<name>Name of Discount</name>
<amount>Amount of Discount</amount>
<startDate>Start Date of Discount</startDate>
<endDate>End Date of Discount</endDate>
</createDiscount>
</updateSubscription>
Example: updateSubscription - Create Add On
<updateSubscription>
<subscriptionId>Subscription Id</subscriptionId>
<createAddOn>
<addOnCode>Add On Reference Code</addOnCode>
<name>Name of Add On</name>
<amount>Amount of Add On</amount>
<startDate>Start Date of Add On Charge</startDate>
<endDate>End Date of Add On Charge</endDate>
</createAddOn>
</updateSubscription>
Example: updateSubscription - Update Discount
<updateSubscription>
<subscriptionId>Subscription Id</subscriptionId>
<updateDiscount>
<discountCode>Discount Reference Code</discountCode>
<name>Name of Discount</name>
<amount>Amount of Discount</amount>
<startDate>Start Date of Discount</startDate>
<endDate>End Date of Discount</endDate>
</updateDiscount>
</updateSubscription>
Example: updateSubscription - Update Add On
<updateSubscription>
<subscriptionId>Subscription Id</subscriptionId>
<updateAddOn>
<addOnCode>Add On Reference Code</addOnCode>
<name>Name of Add On</name>
<amount>Amount of Add On</amount>
<startDate>Start Date of Add On Charge</startDate>
<endDate>End Date of Add On Charge</endDate>
</updateAddOn>
</updateSubscription>
Example: updateSubscription - Delete Discount
<updateSubscription>
<subscriptionId>Subscription Id</subscriptionId>
<deleteDiscount>
<discountCode>Discount Reference Code</discountCode>
</deleteDiscount>
</updateSubscription>
Example: updateSubscription - Delete Add On
<updateSubscription>
<subscriptionId>Subscription Id</subscriptionId>
<deleteAddOn>
<addOnCode>Add On Reference Code</addOnCode>
</deleteAddOn>
</updateSubscription>