/services/platforms/v1/subscriptions/refund/request
Auth
Rate limit: 5 requests per user per 10 minutes — prevents accidental double-submits from impatient button-clickers and rules out abuse loops.
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
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. |
| Header | Type | Description | Example |
|---|---|---|---|
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 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string | |
data |
mixed[] |
| Header | Type | Description | Example |
|---|---|---|---|
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 |
| Field | Type | Description |
|---|---|---|
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 |
| Field | Type | Description |
|---|---|---|
message |
string | Errors overview. |
errors |
object | A detailed description of each field that failed validation. |
| Header | Type | Description | Example |
|---|---|---|---|
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 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string | |
data |
mixed[] |
| Header | Type | Description | Example |
|---|---|---|---|
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 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string | |
data |
mixed[] |
| Header | Type | Description | Example |
|---|---|---|---|
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 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string | |
data |
mixed[] |
| Header | Type | Description | Example |
|---|---|---|---|
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 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string |
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())
{
"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"
}
}