Platform Management API
POST /services/platforms/v1/subscriptions/cancel Auth

Cancel Subscription

Request Body Required

FieldTypeRequiredDescriptionExample
subscription_id integer Yes 42
project_id integer Yes 1
immediate boolean Yes false
reason string|null
max: 500
No Switching to a different service

Responses

500
200
422
404
403
401
429
Internal server error
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
FieldTypeDescription
error boolean
message string
data mixed[]
Successful response
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
FieldTypeDescription
error boolean
message string
data object
data.subscription object
Validation error
FieldTypeDescription
message string Errors overview.
errors object A detailed description of each field that failed validation.
Resource not found
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
FieldTypeDescription
error boolean
message string
data mixed[]
Forbidden — insufficient permissions
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
FieldTypeDescription
error boolean
message string
data mixed[]
Unauthenticated — missing or invalid Bearer token
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
FieldTypeDescription
error boolean
message string
Too Many Requests — rate limit exceeded
Headers
HeaderTypeDescriptionExample
X-RateLimit-Limit integer Maximum number of requests allowed per minute 60
X-RateLimit-Remaining integer Number of requests remaining in the current window 57
Retry-After integer Seconds until the rate limit resets 60
FieldTypeDescription
error boolean
message string
Base URL
https://api.wemasy.nl/api
Authentication

Request Sample
cURL
JS
PHP
Python
curl -X POST "https://api.wemasy.nl/api/services/platforms/v1/subscriptions/cancel" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "subscription_id": 42,
    "project_id": 1,
    "immediate": false,
    "reason": "Switching to a different service"
}'
fetch('https://api.wemasy.nl/api/services/platforms/v1/subscriptions/cancel', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "subscription_id": 42,
    "project_id": 1,
    "immediate": false,
    "reason": "Switching to a different service"
})})
.then(r => r.json())
.then(data => console.log(data));
$response = Http::withToken('YOUR_API_TOKEN')
    ->accept('application/json')
    ->post('https://api.wemasy.nl/api/services/platforms/v1/subscriptions/cancel', {
    "subscription_id": 42,
    "project_id": 1,
    "immediate": false,
    "reason": "Switching to a different service"
});
$data = $response->json();
import requests

headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json"
}
data = {
    "subscription_id": 42,
    "project_id": 1,
    "immediate": false,
    "reason": "Switching to a different service"
}
r = requests.post("https://api.wemasy.nl/api/services/platforms/v1/subscriptions/cancel", headers=headers, json=data)
print(r.json())
Response Example
{
    "error": false,
    "message": "string",
    "data": {
        "subscription": {
            "id": 0,
            "project_id": 0,
            "payment_gateway_id": 0,
            "subscription_type": "string",
            "package_key": "string",
            "tool_key": "string",
            "plan_key": "string",
            "billing_period": "string",
            "price": "string",
            "promotional_price": "string",
            "promotional_ends_at": "string",
            "campaign_code": "string",
            "currency_code": "string",
            "status": "string",
            "auto_renew": true,
            "auto_renew_disabled_at": "string",
            "trial_ends_at": "string",
            "trial_days": 0,
            "grace_days": 0,
            "grace_ends_at": "string",
            "started_at": "string",
            "current_period_start": "string",
            "current_period_end": "string",
            "next_billing_date": "string",
            "last_billing_date": "string",
            "cancelled_at": "string",
            "expires_at": "string",
            "included_tools": [],
            "usage_limits": [],
            "package_metadata": [],
            "reminder_schedule": [],
            "pending_change": [],
            "payment_provider": "string",
            "external_subscription_id": "string",
            "gateway_subscription_id": "string",
            "gateway_session_id": "string",
            "created_by": 0,
            "created_at": "string",
            "updated_at": "string"
        }
    }
}

Try It
Request Body Required

Export