Termination

👍

Check our Reference Materials for more details about a payment connector.

Description

Cleeng Webhooks send notifications for the events that happen within the Cleeng system, one of these events is subscriptionReadyForTermination.

Upon subscribing to this event, you will be receiving all the data necessary for performing the subscription termination process to the specified endpoint that was set up during Webhooks configuration.

A call must be made to Cleeng Payment API to terminate the subscription (terminateSubscription API call). This process terminates the subscription on the Cleeng platform side and revokes the subscriber's entitlement.

Process Flow

Termination Process FlowTermination Process Flow

Termination Process Flow

📘

Note

Details of the implementation will depend on a specific payment gateway solution.

Step-by-Step Guide

Prerequisites

To start with this process, make sure that the following are in place:

  1. Webhooks - to learn more about how to configure and use Cleeng Webhooks, please click here. You can also find the list of available webhooks here.

You will need to subscribe to the following: subscriptionReadyForTermination

Note:
Please note that responses to webhooks need to return “200” response code. If they don’t respond with “200”, webhooks will be resent.

  1. Dunning Action Settings - to find out more click here.

Please note the grace period field in Dunning Action Settings. Grace period allows you to keep the subscription active after due to date. It gives an additional time to process payments before it terminates.

Terminate Subscription

To terminate a subscription on Cleeng side and revoke the subscriber's entitlement an API call should be made to Cleeng Payment API using terminateSubscription API call - POST /3.1/wrappers/terminate_subscription.

curl -X POST "https://api.cleeng.com/3.1/wrappers/terminate_subscription" 
-H "accept: application/json"   
-H 'X-Publisher-Token: a6xxki_mf493WSBjEs9D-UpN-0kyESWYPUQo9S6nEewTyuL7'
-d '{
    "subscriptionId": "100108654"
}'

Good to Know

When subscriptionReadyForTermination webhook arrives, it also allows the connector to do some “cleaning”, for example: cancelling authorised payments.

Up Next

Congratulations! By now you should have all mandatory features implemented, including subscription initial purchase and recurring billing, as well as termination.

Go on to our Connector Checklist to make sure all is in place.

Once your connector is ready, please make sure that you display your offer with available payment methods (see Offer Display).


Did this page help you?