This function cancels a subscription.<package_name>/subscriptions/<subscription_id>/purchases/<purchase_token>/cancel/

You should fill the values in the angle brackets according to your request:

NameExpected Value
package_namePackage name of the app in which product of the request subscription is defined.
subscription_idSKU of the subscription product.
purchase_tokenPurchase token returned by Bazaar to app when subscription started. You can also use the token of any of the further billings of that subscription.

Note that you need a valid access_token to use this method.

If subscription is successfully cancelled, the result will be an empty JSON object:


In case of an error, you'll recieve a response with 40X status code, with a body of JSON object containing an error field which specifies the error and an error_description field explaining the cause of error. For example, if the requested subscription is not found, the response would have a 404 status code and this content:

   "error": "not_found",
   "error_description": "The requested subscription is not found!",

If the subscription is cancelled or expired, or the product is not found, the request will result in an error, as mentioned earlier, with a value of invalid_value for error.

Was this content helpful?
Write your comment here...

If you have any comment on this content or any idea to make it better, use this form to send us your comment.

Publish Date: ۱۴۰۰-۰۴-۱۱ ۱۱:۳۶

Latest Update: ۱۴۰۰-۰۴-۱۱ ۱۲:۳۰