If a customer changes their mind after cancelling a subscription, you can reverse the cancellation as long as the subscription has not yet ended. Both the public API and the Customer API support this operation.
Undo a cancellation
// @see https://api.frisbii-media.com/#tag/Subscriptions/operation/undoCancelSubscription
// @see https://customer-api.frisbii-media.com/#tag/Subscriptions/operation/undoCancelSubscription
$subscription = json_decode($client->request('PUT',
"/subscriptions/{$subscriptionId}/cancel/undo",
[
'headers' => ['X-plenigo-token' => eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9],
'json' => [],
]
)->getBody()->getContents(), true);
After a successful undo, the subscription continues normally and the previous cancellation date is removed.
When undo is possible
Undo cancellation is only available while the subscription is still active — i.e. before the cancellation date has been reached. Once the subscription has ended, it cannot be reinstated via this endpoint. In that case, a new subscription must be created.