Renewing a Subscription

From API Documentation

Jump to: navigation, search

Use the Amendment object to renew a subscription manually. Note that a subscription will automatically renew if the Subscription field AutoRenew has been set to True.

Starting in Version 25.0 and greater, you can now create an Amendment in a single call. As of version 28.0, you can use the amend() call to preview the changes that the amendment would make.

NOTE: When creating amendments in a single call, you must set the CallOptions in your SOAP header and set useSingleTransaction to true to use this functionality. See CallOptions for more details.

To PREIVEW renewing a subscription (version 28.0+):

Using the Amend call, pass it

  • An Amendment object
  • Specify the following fields
    • Set the ContractEffectiveDate
    • Set the Name
    • Specify the subscription's ID
    • Set the Type to Renewal
  • AmendOptions is not supported currently.
  • PreviewOptions must enable preview mode.

Sample SOAP

<api:amend>
   <api:requests>
      <api:Amendments>
         <obj:ContractEffectiveDate>2010-01-01T20:44:54.718+05:30</obj:ContractEffectiveDate>
         <obj:CustomerAcceptanceDate>2010-01-01T20:44:54.718+05:30</obj:CustomerAcceptanceDate>
         <obj:Description>testing description - aaaaaaaaaaaaa</obj:Description>
         <obj:EffectiveDate>2010-01-01T20:44:54.718+05:30</obj:EffectiveDate>
         <obj:Name>testing renewal - name</obj:Name>
         <obj:ServiceActivationDate>2010-01-01T20:44:54.718+05:30</obj:ServiceActivationDate>
         <obj:Status>Completed</obj:Status>
         <obj:SubscriptionId>402892c42ce80787012ce80ea1aa0014</obj:SubscriptionId>
         <obj:Type>Renewal</obj:Type>
      </api:Amendments>
      <api:AmendOptions>
         <api:GenerateInvoice>false</api:GenerateInvoice>
         <api:ProcessPayments>false</api:ProcessPayments>
      </api:AmendOptions>
      <api:PreviewOptions>
         <api:EnablePreviewMode>false</api:EnablePreviewMode>
      </api:PreviewOptions>
   </api:requests>
</api:amend>

To renew a subscription (version 25.0+):
NOTE: You must set the CallOptions in your SOAP header and set useSingleTransaction to true to enable this functionality. See CallOptions for more details.

  • Create an Amendment
  • Specify the following fields
    • Set the ContractEffectiveDate
    • Set the Name
    • Specify the subscription's ID
    • Set the Type to Renewal

Sample SOAP:

<api:amend>
   <api:requests>
      <api:Amendments>
         <obj:ContractEffectiveDate>2010-01-01T20:44:54.718+05:30</obj:ContractEffectiveDate>
         <obj:CustomerAcceptanceDate>2010-01-01T20:44:54.718+05:30</obj:CustomerAcceptanceDate>
         <obj:Description>Renewal amendment</obj:Description>
         <obj:EffectiveDate>2010-01-01T20:44:54.718+05:30</obj:EffectiveDate>
         <obj:Name>Renewal Amendment</obj:Name>
         <obj:ServiceActivationDate>2010-01-01T20:44:54.718+05:30</obj:ServiceActivationDate>
         <obj:Status>Completed</obj:Status>
         <obj:SubscriptionId>402892c42ce80787012ce80ea1aa0014</obj:SubscriptionId>
         <obj:Type>Renewal</obj:Type>
      </api:Amendments>
      <api:PreviewOptions>
         <api:EnablePreviewMode>true</api:EnablePreviewMode>
      </api:PreviewOptions>
   </api:requests>
</api:amend>


To renew a subscription (version 24.0-):


1) Create a new Amendment.

  • Set the following fields:
    • Set the EffectiveDate to the desired date and time of renewal. This date and time must be in the future.
    • Set the Name for the amendment.
    • Set the Status to Draft.
    • Specify the SubscriptionID.
    • Set the Type to Renewal.
  • Create the new amendment, see the create() API call.

The SOAP call envelope payload should look like this:

<ns1:create xmlns:ns1="http://api.zuora.com/">
 <ns1:zObjects xmlns:ns2="http://object.api.zuora.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:Amendment">
   <ns2:EffectiveDate>2009-11-08T08:00:00</ns2:EffectiveDate>
   <ns2:Name>Renew Subscription</ns2:Name>
   <ns2:Status>Draft</ns2:Status>
   <ns2:SubscriptionId>4028e69922ece21e0122f1de76654503</ns2:SubscriptionId>
   <ns2:Type>Renewal</ns2:Type>
 </ns1:zObjects>
</ns1:create>

2) Update the new Amendment.

  • Set the following fields:
    • Specify the Amendment's ID.
    • Set the ContractEffectiveDate to a date and time in the future.
    • If Require Customer Acceptance of Orders? is set on the Z-Billing Admin "Default Subscription Settings" page to Yes, then ContractAcceptanceDate will also need to be specified.
    • If Require Service Activation? is set on the Z-Billing Admin "Default Subscription Settings" page to Yes, then ServiceActivationDate will also need to be specified.
    • Set Status to Completed.
  • Update the new amendment, see the update() API call.

The SOAP call payload should look like this:

<ns1:update xmlns:ns1="http://api.zuora.com/">
 <ns1:zObjects xmlns:ns2="http://object.api.zuora.com/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns2:Amendment">
   <ns2:Id>4028e69922ece21e0122f734f76777d6</ns2:Id>
   <ns2:ContractEffectiveDate>2009-11-08T08:00:00</ns2:ContractEffectiveDate>
   <ns2:ServiceActivationDate>2009-11-08T08:00:00</ns2:ServiceActivationDate>
   <ns2:ContractAcceptanceDate>2009-11-08T08:00:00</ns2:ContractAcceptanceDate>
   <ns2:Status>Completed</ns2:Status>
 </ns1:zObjects>
</ns1:update>