Subscriptions can run indefinitely or they may run for a fixed number of billing cycles. Contract terms provides a mechanism to manage contract periods for subscriptions whereby:

  • You can define contract terms using
    • Create a subscription
    • Create a subscription for a customer
    • Update a subscription
    • Reactivate a subscription
  • You can cancel a contract term using
    • Update a subscription
    • Cancel a subscription

Sample contract term [ JSON ]

{ "action_at_term_end": "renew", "billing_cycle": 12, "cancellation_cutoff_period": 0, "contract_end": 1548974761, "contract_start": 1517438761, "created_at": 1517438761, "id": "__test__3Nl7o66Rt41dR98T", "remaining_billing_cycles": 11, "status": "active", "total_contract_value": 10740 }
id
Id that uniquely identifies the contract term in the site.
string, max chars=50
status
Current status of contract.
enumerated string
Possible values are
activeAn actively running contract term.completedThe contract term has run its full duration.cancelledThe contract term was ended because: .terminatedThe contract term was terminated ahead of completion.
contract_start
The start date of the contract term.
timestamp(UTC) in seconds
contract_end
The end date of the contract term.
timestamp(UTC) in seconds
billing_cycle
The number of billing cycles of the subscription that the contract term is for.
integer, min=0
action_at_term_end
End of action which needs to be taken at the contract end.
enumerated string, default=renew
Possible values are
renew
  • Contract term completes and a new contract term is started for the number of billing cycles specified in contract_billing_cycle_on_renewal.
  • The action_at_term_end for the new contract term is set to renew.
  • .
    evergreenContract term completes and the subscription renews.cancelContract term completes and subscription is cancelled.renew_onceUsed when you want to renew the contract term just once. Does the following:
  • Contract term completes and a new contract term is started for the number of billing cycles specified in contract_billing_cycle_on_renewal.
  • The end_of_action for the new contract term is set to renew.
  • .
    total_contract_value
    The sum of all the totalsactive contract terms, this is a predicted value.
    in cents, default=0, min=0
    cancellation_cutoff_period
    The number of days before contract_end, during which the customer is barred from canceling the contract term. The customer is allowed to cancel the contract term via the Self-Serve Portal only before this period. This allows you to have sufficient time for processing contract term closure. .
    optional, integer
    created_at

    timestamp(UTC) in seconds
    subscription_id
    A unique identifier to identify the subscription. You will use this to perform all operations on this subscription.
    string, max chars=50
    remaining_billing_cycles
    The number of subscription billing cycles remaining after the current one. The active contract completes after this.
    optional, integer, min=0