Subscription Cancellation

Cancel a user subscription.

To cancel a user subscription using this API, follow these steps:

1. Set the Request Details

URL: https://staging-gateway.mondiapay.com/v1/api/subscription/123451234?immediately=false

  • Replace the user's subscription id in the URL of the request, replace 123451234, with the "id" number from the response of the GET Purchase API
  • Set immediately is set to true, if sub is needed to be cancelled now,
  • or false, if you need the user to access content until next renewal date. (Tag for Cancel)

2. Add the Required Headers and Parameters

Authorization Header: Fill in the Authorization header with the user access token obtained from the User Creation & Access Token API request, formatted as follows:

Bearer U1234abcde-1234-abcd-1234-abcd1234abcd

HeaderValue
Content-Typeapplication/json
AuthorizationGenerated User Access Token

Request BodyDescriptionRequired
subscriptionIduser subscription identifierYes
immediatelySet this value to true, if you require immediate cancellation, or set to false if you require user to keep access to content until next renewal. (This flag is subject to operator's guidelines and approval)Yes

IMPORTANT NOTE:

The Request URL here contains a number 123451234 before the parameter "immediately", that number corresponds to the subscription ID of the user which can be found in the response of the Purchase API request called "id".





Language
URL
Click Try It! to start a request and see the response here!