Subscription Cancellation

Cancel a user subscription.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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

1. Set the Request Details

URL:https://stg-gw.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".





Path Params
int32
required
Defaults to 123451234

user subscription identifier

Query Params
boolean
Defaults to true

flag to cancel subscription immediately or not, default to false

Headers
string
Defaults to Bearer Ua0c5cf26-6d17-45c5-a7f6-5c68b92c5b4b

This field is mandatory and should follow the format: Bearer then single space then access_token that starts with letter U (obtained from response of User Access Token API)

Responses

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json