Contents
On this page
Adjust Gift Card - Plugixa POS for WooCommerce
POST /plugixa-pos/v1/gift-cards/{id}/adjust
Add (positive) or take (negative) money on a card. The change goes to the card’s ledger and to the audit log.
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
POST https://your-site.example/wp-json/plugixa-pos/v1/gift-cards/3/adjust
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The gift card’s id |
Request body
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
amount |
string |
Yes | Decimal, may be negative: -5.00. |
note |
string |
Yes | Why, 1 to 200 characters. |
{
"amount": "5.00",
"note": "Goodwill after a late delivery"
}
Responses
200 OK. data is the card with its ledger, as in Get Gift Card.
{
"success": true,
"data": {
"id": 3,
"code": "GCFB39G22VGVYD",
"display": "GC-FB39-G22V-GVYD",
"balance": "6.00",
"initial": "25.00",
"status": "active",
"customer_id": null,
"order_id": 3974,
"expires_at": null,
"expired": false,
"created_at": "2026-10-10 15:54:23",
"ledger": [
{
"type": "redeem",
"amount": "-24.00",
"balance_after": "1.00",
"order_id": 4050,
"note": "",
"user": "Paul Girard",
"created_at": "2026-10-16 10:49:08"
},
{
"type": "issue",
"amount": "25.00",
"balance_after": "25.00",
"order_id": 3974,
"note": "",
"user": "Emma Laurent",
"created_at": "2026-10-10 15:54:23"
}
]
}
}
Errors
| Status | Code | When |
|---|---|---|
404 |
plugixa_pos_not_found |
No gift card with that id. |
409 |
plugixa_pos_gift_card_disabled |
Taking money from a disabled card. |
409 |
plugixa_pos_gift_card_balance |
Taking more than the card holds. |
Plus the errors every endpoint can return.
Examples
curl -s -X POST "https://your-site.example/wp-json/plugixa-pos/v1/gift-cards/3/adjust" \
-u "$WP_USER:$WP_APP_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"amount":"5.00","note":"Goodwill after a late delivery"}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-pos/v1/gift-cards/3/adjust');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => getenv('WP_USER') . ':' . getenv('WP_APP_PASSWORD'),
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'amount' => '5.00',
'note' => 'Goodwill after a late delivery',
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-pos/v1/gift-cards/3/adjust', {
method: 'POST',
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ amount: '5.00', note: 'Goodwill after a late delivery' }),
});
const { data } = await response.json();
Quick Links
Share