Contents
Daily Check-in - Plugixa Stream
POST /plugixa-stream/v1/rewards/checkin
Give the caller today’s check-in coins, once a day. Each day in a row moves one step up the reward ladder; a missed day starts again at day one. The day is the site’s, in its time zone.
Any signed-in user (an Application Password, or the login cookie with an X-WP-Nonce header). Signed out, it answers 401 plugixa_stream_login_required. It always acts on the caller’s own account. Rate-limited with the other reward requests: 60 a minute per account.
Request
POST https://your-site.example/wp-json/plugixa-stream/v1/rewards/checkin
Responses
200 OK.
{
"success": true,
"data": {
"coins": 10,
"streak": 3,
"balance": {
"paid": 300,
"bonus": 55,
"total": 355
}
}
}
| Field | Type | Meaning |
|---|---|---|
data.coins |
integer |
Bonus coins given |
data.streak |
integer |
Days in a row, today included |
data.balance.paid |
integer |
Coins bought |
data.balance.bonus |
integer |
Coins given: check-in rewards, pack bonuses, grants |
data.balance.total |
integer |
Both |
Errors
| Status | Code | When |
|---|---|---|
401 |
plugixa_stream_login_required |
Signed out. |
409 |
plugixa_stream_already |
Already checked in today. |
500 |
plugixa_stream_wallet |
The wallet could not be updated; the day is given back. |
429 |
plugixa_stream_rate_limited |
More than 60 requests of this kind in the current minute. |
Plus the errors every endpoint can return.
Examples
curl -s -X POST "https://your-site.example/wp-json/plugixa-stream/v1/rewards/checkin" \
-u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-stream/v1/rewards/checkin');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => getenv('WP_USER') . ':' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-stream/v1/rewards/checkin', {
method: 'POST',
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
},
});
const { data } = await response.json();
Quick Links
Share