Contents
On this page
Add Cash Movement - Plugixa POS for WooCommerce
POST /plugixa-pos/v1/sessions/{id}/cash-movements
Record cash put in (in) or taken out (out) of the drawer during the session, for change or a bank drop. The answer is the session report.
Needs a user with the plugixa_pos_manage_sessions 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. The user must also be allowed to use the register (register access).
Request
POST https://your-site.example/wp-json/plugixa-pos/v1/sessions/85/cash-movements
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The session’s id |
Request body
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
type |
string |
Yes | in or out. |
amount |
string |
Yes | Decimal string, above zero. |
reason |
string |
No | Why. |
{
"type": "out",
"amount": "100.00",
"reason": "Bank drop"
}
Responses
200 OK. data is the session report, as in Get Session Report.
{
"success": true,
"data": {
"session": {
"id": 84,
"register_id": 3,
"opened_by": 101,
"closed_by": 101,
"opening_float": 15000,
"expected": {
"card": "280.40",
"cash": "197.90"
},
"counted": {
"card": "280.40",
"cash": "197.90"
},
"difference": 0,
"status": "closed",
"opened_at": "2026-11-14 08:34:00",
"closed_at": "2026-11-14 18:10:00",
"updated_at": "2026-11-14 18:10:00"
},
"currency": "EUR",
"sales_count": 7,
"refunds_count": 0,
"sales": "328.30",
"refunds": "0.00",
"net_sales": "328.30",
"tax": "54.72",
"discount": "0.00",
"opening_float": "150.00",
"cash_in": "0.00",
"cash_out": "100.00",
"payments": {
"card": "280.40",
"cash": "47.90"
},
"taxes": {
"8": {
"label": "TVA",
"rate": "20.0000",
"amount": "54.72"
}
},
"expected": {
"card": "280.40",
"cash": "197.90"
},
"deposits": {
"count": 0,
"received": "0.00",
"refunded": "0.00",
"applied": "0.00",
"tax": "0.00"
},
"foreign": []
}
}
Errors
| Status | Code | When |
|---|---|---|
404 |
plugixa_pos_not_found |
No session with that id. |
403 |
plugixa_pos_register_forbidden |
The register is missing or archived, or the user may not use it. |
409 |
plugixa_pos_session_closed |
The session is closed. |
422 |
plugixa_pos_invalid_amount |
The amount is zero. |
Plus the errors every endpoint can return.
Examples
curl -s -X POST "https://your-site.example/wp-json/plugixa-pos/v1/sessions/85/cash-movements" \
-u "$WP_USER:$WP_APP_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"type":"out","amount":"100.00","reason":"Bank drop"}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-pos/v1/sessions/85/cash-movements');
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([
'type' => 'out',
'amount' => '100.00',
'reason' => 'Bank drop',
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-pos/v1/sessions/85/cash-movements', {
method: 'POST',
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ type: 'out', amount: '100.00', reason: 'Bank drop' }),
});
const { data } = await response.json();
Quick Links
Share