Contents
On this page

List Payments - Plugixa Car Rental

GET /plugixa-car-rental/v1/bookings/{id}/payments

Read a booking’s payment ledger: every payment and refund, what has been paid and what is still owed.

Needs the Payments app, which is always on. The user needs the plugixa_car_rental_view capability.

Request

GET https://your-site.example/wp-json/plugixa-car-rental/v1/bookings/128/payments

Path parameters

Name Type Description
id integer The booking’s id

Responses

200 OK. data is the ledger, oldest row first.

{
  "success": true,
  "data": {
    "rows": [
      {
        "id": 41,
        "gateway": "desk",
        "gateway_label": "desk",
        "type": "desk",
        "amount": 197.1,
        "currency": "EUR",
        "status": "completed",
        "transaction_id": "",
        "note": "Card at the counter",
        "created_at": "2026-12-01 09:10:00"
      }
    ],
    "paid": 197.1,
    "owed": 0.0,
    "currency": "EUR"
  }
}
Field Type Meaning
data.rows[].id integer The ledger row’s id
data.rows[].gateway string desk for money taken or given back at the desk, else the online payment method’s id, such as stripe or paypal
data.rows[].gateway_label string That method’s name. For desk, the id itself
data.rows[].type string desk for a desk payment, refund for money given back, or what an online payment paid for, such as full, balance or part
data.rows[].amount number Always positive. A refund counts against what was paid
data.rows[].status string completed, or failed for an online attempt that failed
data.rows[].transaction_id string The payment provider’s reference, or empty
data.rows[].note string Your note
data.rows[].created_at string UTC datetime it was recorded
data.paid number Completed payments minus completed refunds
data.owed number The booking’s total minus paid, never below 0
data.currency string The booking’s currency

The ledger is not paged. Rows are never edited or deleted: a mistake is put right with a refund.

Errors

Status Code When
404 plugixa_car_rental_not_found No booking with that id, or it is in the trash.

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-car-rental/v1/bookings/128/payments" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-car-rental/v1/bookings/128/payments');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => 'admin:' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const auth = Buffer.from(`admin:${process.env.WP_APP_PASSWORD}`).toString('base64');
const response = await fetch('https://your-site.example/wp-json/plugixa-car-rental/v1/bookings/128/payments', {
  headers: {
    'Authorization': `Basic ${auth}`,
  },
});
const { data } = await response.json();

Quick Links

Share