Platform Management API
POST /services/platforms/v1/subscriptions/refund/request Auth

Request a refund

Rate limit: 5 requests per user per 10 minutes — prevents accidental double-submits from impatient button-clickers and rules out abuse loops.

Request Body Required

FieldTypeRequiredDescriptionExample
subscription_id integer Yes 42
project_id integer Yes 1
reason_code string
too_expensive, not_what_expected, found_alternative, bug, other
Yes too_expensive
reason_comment string|null
max: 2000
No The website builder felt slow on my older laptop.

Responses

500
200
422
404
429
403
401
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.flow string
auto, standard_ticket, blocked
data.refund_request object
data.ticket_id integer
data.ticket_number string
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[]
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
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
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/refund/request" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "subscription_id": 42,
    "project_id": 1,
    "reason_code": "too_expensive",
    "reason_comment": "The website builder felt slow on my older laptop."
}'
fetch('https://api.wemasy.nl/api/services/platforms/v1/subscriptions/refund/request', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Accept': 'application/json',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "subscription_id": 42,
    "project_id": 1,
    "reason_code": "too_expensive",
    "reason_comment": "The website builder felt slow on my older laptop."
})})
.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/refund/request', {
    "subscription_id": 42,
    "project_id": 1,
    "reason_code": "too_expensive",
    "reason_comment": "The website builder felt slow on my older laptop."
});
$data = $response->json();
import requests

headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json"
}
data = {
    "subscription_id": 42,
    "project_id": 1,
    "reason_code": "too_expensive",
    "reason_comment": "The website builder felt slow on my older laptop."
}
r = requests.post("https://api.wemasy.nl/api/services/platforms/v1/subscriptions/refund/request", headers=headers, json=data)
print(r.json())
Response Example
{
    "error": false,
    "message": "string",
    "data": {
        "flow": "string",
        "refund_request": {
            "id": 0,
            "ticket_id": 0,
            "subscription_id": 0,
            "invoice_id": 0,
            "refund_invoice_id": 0,
            "requested_by_user_id": 0,
            "reviewed_by_user_id": 0,
            "amount_cents": 0,
            "currency": "string",
            "status": "string",
            "reason_code": "string",
            "reason_comment": "string",
            "gateway_refund_id": "string",
            "gateway_response": [],
            "denied_reason": "string",
            "approved_at": "string",
            "denied_at": "string",
            "processed_at": "string",
            "failed_at": "string",
            "failure_reason": "string",
            "stuck_alerted_at": "string",
            "created_at": "string",
            "updated_at": "string"
        },
        "ticket_id": 0,
        "ticket_number": "string"
    }
}

Try It
Request Body Required

Export