== payment_subscriptions.cancel ==
=== Description ===
Cancel user's subscription. User will remain premium until subscription expire, after that it will be demoted to free access.
IMPORTANT:
Cancel must be performed against appropriate system's url(system_id, retrieved by payment_subscriptions.search)
```
if system_id == m21
staging: https://cs-m21.dvipdev.com/
production: https://cs-m21.dvipapp.com/
```
==== Input Parameters ====
<table>
<tr><th>Name</th><th>Type</th><th>Required</th><th>Description</th><th>Note</th></tr>
<tr><td>item_id</td><td>string</td><td>Yes</td><td>Item ID</td><td>Retrieved by payment_subscriptions.search</td></tr>
</table>
==== Return ====
<table>
<tr><th>Name</th><th>Type</th><th>Description</th><th>Note</th></tr>
<tr><td>success</td><td>bool</td><td>Was canceling successfull?</td><td></td></tr>
</table>
==== Usage Example ====
example query:
```
/api.json?cmd=payment_subscriptions.cancel&item_id=211288
```
example of canceled successfully response:
```lang=json
{
"meta": {
"status": "OK"
},
"result": {
"success": true,
"id": 0,
"data": [
],
"item": [
]
}
}
```
example of failure response:
```lang=json
{
"meta": {
"errors": [
{
"code": "error_not_allowed",
"params": null,
"sticky": false,
"text": "Not allowed"
}
],
"status": "ERROR"
},
"result": {
"success": false,
"id": 0,
"data": [
],
"item": [
]
}
}
```