Contents
On this page

Get Coin History - Plugixa Stream

GET /plugixa-stream/v1/me/ledger

Every movement of the caller’s coins, newest first.

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/ledger?per_page=20

Query parameters

Field Type Required Description
page integer No Page to return, from 1. Defaults to 1.
per_page integer No Entries per page, clamped to 1 to 100. Defaults to 24.

Responses

200 OK. data is a list of entries.

{
  "success": true,
  "data": [
    {
      "id": "88",
      "type": "reward",
      "coins_paid": "0",
      "coins_bonus": "10",
      "paid_after": "300",
      "bonus_after": "45",
      "ref_type": "checkin",
      "ref_id": "0",
      "note": "Daily check-in, day 3",
      "created_at": "2026-11-17 07:15:02"
    }
  ]
}
Field Type Meaning
data[].type string purchase, reward, grant, unlock, refund or revoke
data[].coins_paid string Change in bought coins, negative when spent. Also coins_bonus
data[].paid_after string Bought coins after it. Also bonus_after
data[].ref_type string What it relates to, such as episode, series, order, checkin, admin. ref_id is its id
data[].note string The line the viewer sees
data[].created_at string UTC, Y-m-d H:i:s

The rows come as the database stores them: every value, numbers included, is a string. There is no meta: ask for the next page until one comes back shorter than per_page.

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/ledger?per_page=20" \
  -u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-stream/v1/me/ledger?per_page=20');
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/ledger?per_page=20', {
  headers: {
    'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
  },
});
const { data } = await response.json();

Quick Links

Share