API Reference

The Mondia Cancel Subscription API allows you to cancel a user's subscription, either immediately or by tagging for cancellation. Depending on the type of cancellation, users may have access to content until their next renewal date.

To create an API flow session for user subscription cancellation, follow these steps:


1. Set the Request Details

  • URL: /marketplace/payment/session/subscription/cancel

2. Add the Required Headers

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

Bearer C1234abcde-1234-abcd-1234-abcd1234abcd

HeaderValue
Content-Typeapplication/json
x-api-keyYour API Key
AuthorizationYour User Id

3. Prepare the Request Body

Replace redirectionUrl, lang, and subscriptionId in the body with your specific configuration values.

Request BodyDescriptionRequired
redirectionUrlThe URL to redirect to after a user subscription paymentYes
langThe two-letter ISO-639-1 language code - defaults to client's default languageYes
subscriptionIdThe Id of the subscriptionYes

4. Make the Request

Once you’ve set the URL, headers, and body, send the POST request.

Keep the session Id and follow the provided handlerUrl for the next step in the subscription cancellation process. The session is valid for 24 hours.



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