Contents
Record Payment - Plugixa Car Parking
POST /plugixa-car-parking/v1/payments
Record money received for a booking outside the online checkout, such as cash at the barrier or a bank transfer. The payment is stored as completed, and the booking’s paid state is worked out again.
The user needs the plugixa_carparking_create capability.
Note. Recording a payment changes the booking’s
statusas well as itsamount_paidandpayment_status. Once the payments reach the booking’s total, the booking becomespaid; while they are below it,confirmedanddeposit_paid. This replaces whatever status the booking had,completedincluded. The one exception is a booking whose hold had lapsed and whose space has been booked by someone else since: it becomesexpired, and the money stays on the ledger. The amount is not capped at what the booking costs. No money moves: nothing is charged at any payment provider.
Request
POST https://your-site.example/wp-json/plugixa-car-parking/v1/payments
Request body
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
booking_id |
integer |
Yes | An existing booking, not in the trash. |
amount |
number |
Yes | More than zero, with a dot for decimals. |
type |
string |
No | full, deposit or balance (and installment with Pro). Defaults to full. refund is not accepted: use Refund Payment. |
gateway |
string |
No | The payment method to file it under: offline, or with Pro stripe, paypal, mollie, adyen, klarna. Defaults to offline. |
The payment takes the booking’s currency. It has no transaction id, and its response is { "source": "manual" }. When the booking ends up fully paid and booking notifications are switched on, the payment-received messages are sent.
{
"booking_id": 57,
"amount": 10,
"type": "deposit",
"gateway": "offline"
}
Responses
201 Created. data is the new payment.
{
"success": true,
"data": {
"id": 31,
"booking_id": 57,
"gateway": "offline",
"transaction_id": null,
"type": "deposit",
"amount": 10,
"currency": "EUR",
"status": "completed",
"response": { "source": "manual" },
"created_by": 1,
"modified_by": 1,
"created_at": "2026-11-12 10:05:00",
"updated_at": null,
"modified_at": "2026-11-12 10:05:00",
"deleted_at": null,
"booking_ref": "PKG-3F9A1C",
"gateway_label": "Pay on arrival"
}
}
| Field | Type | Meaning |
|---|---|---|
data.id |
integer |
The new payment’s id |
data.status |
string |
Always completed |
data.amount |
number |
The amount recorded |
data.currency |
string |
The booking’s currency |
data.booking_ref |
string |
The booking’s reference |
Read the booking again with Get Booking to see its new amount_paid, payment_status and status.
Errors
| Status | Code | When |
|---|---|---|
422 |
plugixa_carparking_not_a_number |
booking_id or amount is not a number. |
422 |
plugixa_carparking_negative_number |
booking_id or amount is negative. |
422 |
plugixa_carparking_invalid_choice |
type or gateway is not one of the allowed values. |
422 |
plugixa_carparking_invalid_booking |
booking_id is missing, or not a booking outside the trash. |
422 |
plugixa_carparking_invalid_amount |
amount is missing or zero. |
409 |
plugixa_carparking_payment_not_recorded |
The payment could not be stored, for example because another payment for the booking was being saved. Try again. |
Plus the errors every endpoint can return.
Examples
curl -s -X POST "https://your-site.example/wp-json/plugixa-car-parking/v1/payments" \
-u "admin:$WP_APP_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"booking_id":57,"amount":10,"type":"deposit","gateway":"offline"}'
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-car-parking/v1/payments');
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_USERPWD => 'admin:' . getenv('WP_APP_PASSWORD'),
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode([
'booking_id' => 57,
'amount' => 10,
'type' => 'deposit',
'gateway' => 'offline',
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/plugixa-car-parking/v1/payments', {
method: 'POST',
headers: {
'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
'Content-Type': 'application/json',
},
body: JSON.stringify({ booking_id: 57, amount: 10, type: 'deposit', gateway: 'offline' }),
});
const { data } = await response.json();
Quick Links
Share