/services/webshop/v1/donations/checkout
Public
A donation from the site's donation form: makes a checkout order with one donation line and opens the payment at the project's own provider (Mollie, Stripe or Razorpay), as the shop's checkout does. Answers the provider's payment page to send the donor to. The money goes to the owner's own provider account; WEMASY never holds or pays out donations.
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
website_id |
integer | Yes | ||
amount |
number
min: 1 max: 10000 |
Yes | ||
email |
string (email)
max: 191 |
Yes | ||
name |
string|null
max: 191 |
No | ||
message |
string|null
max: 1000 |
No | ||
payment_method |
string|null
max: 64 |
No | ||
url |
string|null
max: 2000 |
No | ||
language |
string|null
max: 10 |
No |
| Header | Type | Description | Example |
|---|---|---|---|
X-RateLimit-Limit |
integer | Maximum number of requests allowed per minute | 10 |
X-RateLimit-Remaining |
integer | Number of requests remaining in the current window | 7 |
| Header | Type | Description | Example |
|---|---|---|---|
X-RateLimit-Limit |
integer | Maximum number of requests allowed per minute | 10 |
X-RateLimit-Remaining |
integer | Number of requests remaining in the current window | 7 |
| Header | Type | Description | Example |
|---|---|---|---|
X-RateLimit-Limit |
integer | Maximum number of requests allowed per minute | 10 |
X-RateLimit-Remaining |
integer | Number of requests remaining in the current window | 7 |
Retry-After |
integer | Seconds until the rate limit resets | 60 |
| Field | Type | Description |
|---|---|---|
error |
boolean | |
message |
string |
curl -X POST "https://api.wemasy.nl/api/services/webshop/v1/donations/checkout" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"website_id": 0,
"amount": 0,
"email": "string",
"name": "string",
"message": "string",
"payment_method": "string",
"url": "string",
"language": "string"
}'
fetch('https://api.wemasy.nl/api/services/webshop/v1/donations/checkout', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN',
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"website_id": 0,
"amount": 0,
"email": "string",
"name": "string",
"message": "string",
"payment_method": "string",
"url": "string",
"language": "string"
})})
.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/webshop/v1/donations/checkout', {
"website_id": 0,
"amount": 0,
"email": "string",
"name": "string",
"message": "string",
"payment_method": "string",
"url": "string",
"language": "string"
});
$data = $response->json();
import requests
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json"
}
data = {
"website_id": 0,
"amount": 0,
"email": "string",
"name": "string",
"message": "string",
"payment_method": "string",
"url": "string",
"language": "string"
}
r = requests.post("https://api.wemasy.nl/api/services/webshop/v1/donations/checkout", headers=headers, json=data)
print(r.json())
{
"payment": {
"url": "https://www.mollie.com/checkout/select-method/abc123"
},
"order_number": "D-1001"
}