Contents
Get Wallet - Plugixa Stream
GET /plugixa-stream/v1/me/wallet
Everything the Watch app’s wallet screen shows: the caller’s coins, what is for sale, their VIP plan, the daily check-in and the payment methods.
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.
Request
GET https://your-site.example/wp-json/plugixa-stream/v1/me/wallet
Responses
200 OK.
{
"success": true,
"data": {
"balance": {
"paid": 300,
"bonus": 45,
"total": 345
},
"currency": "USD",
"packs": [
{
"id": "p300",
"coins": 300,
"bonus": 30,
"price": 1499,
"popular": true,
"display": "14.99"
}
],
"plans": [
{
"id": "vip-month",
"label": "VIP Monthly",
"interval": "month",
"price": 1999,
"display": "19.99"
}
],
"vip": null,
"checkin": {
"claimed_today": false,
"streak": 2,
"next_reward": 10,
"ladder": [5, 5, 10, 10, 15, 15, 30]
},
"trial_days": 7,
"gateways": ["stripe", "paypal"]
}
}
| Field | Type | Meaning |
|---|---|---|
data.balance.paid |
integer |
Coins bought |
data.balance.bonus |
integer |
Coins given: check-in rewards, pack bonuses, grants |
data.balance.total |
integer |
Both |
data.currency |
string |
The site’s currency |
data.packs[] |
object |
Coin packs: id, coins, bonus, price (minor units), popular, display (the price as text, such as 14.99) |
data.plans[] |
object |
VIP plans: id, label, interval (week, month or year), price, display, and, once the plans have been saved, screens (screens at once on the plan, 0 for the site’s limit) |
data.vip |
object|null |
The caller’s VIP plan: plan_id, until (UTC), cancel_at_period_end, status. null when not VIP |
data.checkin.claimed_today |
boolean |
Already checked in today, in the site’s time zone |
data.checkin.streak |
integer |
Days in a row so far |
data.checkin.next_reward |
integer |
Coins the next check-in gives |
data.checkin.ladder |
integer[] |
The reward for each day of a streak; it starts again after the last |
data.trial_days |
integer |
Free days the caller’s first VIP plan would start with; 0 when none is on offer or they had a plan before |
data.gateways |
string[] |
Configured payment methods: stripe, paypal |
Errors
| Status | Code | When |
|---|---|---|
401 |
plugixa_stream_login_required |
Signed out. |
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-stream/v1/me/wallet" \
-u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-stream/v1/me/wallet');
curl_setopt_array($ch, [
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/me/wallet', {
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
},
});
const { data } = await response.json();
Quick Links
Share