In the Bango Subscriptions API, the DELETE /subscription/{subscriptionId} endpoint lets you cancel a subcription – for example, based on a user action in a portal app. There are two main scenarios:
If you cancel a subscription immediately, the subscription enters state CANCELLED. This is a final state.
If you cancel a subscription effective at a later date, the subscription remains in state ACTIVE and the cancelledDate property is set to that date. If nothing else happens, then the subscription changes to state CANCELLED on that date.
However, while the subscription remains ACTIVE with a cancelledDate set, you can "uncancel" the subscription: this reverses or undoes the cancellation. In effect, during this period the subscription is in an "active and pending cancellation" state.
To identify whether a subscription is in "active and pending cancellation" state: look for status ACTIVE and cancelledDate not null.
To uncancel a subscription in "active and pending cancellation" state: use the PUT /subscription/{subscriptionId}/uncancel endpoint. On success, the cancelledDate property is set to null.
You can't uncancel a subscription in state CANCELLED.