Cancellation Process
Summary
As a merchant, you have the ability to use the merchant portal to cancel a plan upon the users direct request. This approach is fine in many cases, but does require additional overhead of you manually interacting with the system. By using the PlanPay cancellation API's, you could add a button to your site to allow the user to cancel directly. Another use could be to automate the cancellation if a product becomes unavailable due to unforseen circumstances.
Process
Cancelling a plan is a two step process, first your website can call the cancellation summary API which will provide information about how much of the plan the user has paid off and a suggested non-refundable amount based on the refund policies you have configured. This can be used to calculate the amount you choose to refund to the customer when calling the cancel plan API. Below is a sequence diagram of how you could integrate this into your website: