Contents
Get Store Credit History - Plugixa POS for WooCommerce
GET /plugixa-pos/v1/store-credit/{customer_id}/history
The balance and the ledger, newest first.
Needs a user with the plugixa_pos_manage_settings capability (signed in with an Application Password, or the login cookie with an X-WP-Nonce header). Administrators hold it; other roles only when you grant it.
Request
GET https://your-site.example/wp-json/plugixa-pos/v1/store-credit/88/history
Path parameters
| Name | Type | Description |
|---|---|---|
customer_id |
integer |
The customer’s user id |
Responses
200 OK.
{
"success": true,
"data": {
"customer_id": 88,
"balance": "25.00",
"ledger": [
{
"type": "adjust",
"amount": "25.00",
"balance_after": "25.00",
"order_id": null,
"note": "Returned a gift",
"user": "admin",
"created_at": "2026-11-16 15:55:29"
}
]
}
}
| Field | Type | Meaning |
|---|---|---|
data.ledger |
object[] |
type, amount, balance_after, order_id, note, user, created_at |
Errors
This endpoint has no errors of its own.
Plus the errors every endpoint can return.
Examples
curl -s "https://your-site.example/wp-json/plugixa-pos/v1/store-credit/88/history" \
-u "$WP_USER:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-pos/v1/store-credit/88/history');
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-pos/v1/store-credit/88/history', {
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
},
});
const { data } = await response.json();
Quick Links
Share