Skip to content

Cancel Purchase Guide

Introduction

The cancel-purchase endpoint is an essential tool for managing user subscriptions, allowing you to cancel purchases or subscriptions for users who no longer meet the criteria established by your service. This functionality is vital for maintaining a flexible and user-centric service, ensuring that subscriptions can be adjusted or terminated as needed.

Prerequisites

Before proceeding with the cancellation process, it's important to ensure you have the following:

  • Authentication: Securing your API calls is crucial, and a valid authentication token is required to initiate any cancellation requests. To obtain and implement an authentication token in your API calls efficiently, please follow the step-by-step instructions in our Authentication Guide.

API Specification

To successfully integrate and utilize the cancel-purchase endpoint within your system, we encourage a thorough review of our API documentation. This resource is designed to provide you with all necessary details, including:

  • Endpoint Overview: Detailed information about the endpoint, including the URL, required headers, and HTTP method.
  • Request Schema: Clear specifications regarding the necessary parameters and data structure needed to initiate a cancellation request.
  • Response Schema: Descriptions of potential responses from the API, encompassing both successful cancellations and various error scenarios.

For a complete understanding of the cancel-purchase endpoint, including request and response formats, please visit our API Specifications.

Furthermore, to aid in visualizing the cancellation process and ensuring a smooth integration, we provide a Flow Diagram. This diagram outlines each step in the cancellation workflow, offering a graphical representation of the process from initiation to completion.

Implementation Steps

Initiating a purchase cancellation involves a few key steps:

  1. Verify that you have a valid authentication token as outlined in our Authentication Guide.
  2. Consult the API specification to familiarize yourself with the required request format and potential responses.
  3. Incorporate the cancel-purchase API call into your system, adhering to the documented specifications.
  4. Conduct thorough testing to ensure that your system correctly processes cancellations and handles any potential errors or edge cases.

This is only applicable in the case of activation link flow. If you are not using the activation link flow ignore this part.

In this case, the cancellation process varies depending on the activation link's current status, which can be either Created, Redeemed, or Canceled. Each status requires a different approach to ensure proper access revocation and subscription management.

Created

For activation links that have been generated but not yet used by the customer, cancellation is straightforward. The link is simply invalidated, preventing any future activation of the associated subscription.

Canceled

If an activation link has been already canceled, the cancellation process is already done, and no further action is required. The link is no longer valid.

Redeemed

When an activation link has been redeemed by the customer, the associated subscription has been activated. In this case, the cancellation process involves cancelling the subscription itself, and revoking the activation link to prevent future activations.

Support

For additional guidance or support, please refer to our Developer Guides or contact our Support Team.