Contents
On this page

Get Monthly Plan - Plugixa Car Parking

GET /plugixa-car-parking/v1/bookings/{id}/installments

Read the monthly payment plan a booking is paid by, with how many months have been paid so far.

Needs Plugixa Car Parking Pro. The user needs the plugixa_carparking_view capability.

Request

GET https://your-site.example/wp-json/plugixa-car-parking/v1/bookings/57/installments

Path parameters

Name Type Description
id integer The booking’s id

Responses

200 OK. data is the plan, or null when the booking is not paid by the month.

{
  "success": true,
  "data": {
    "booking_id": 57,
    "gateway": "stripe",
    "kind": "fixed",
    "months": 6,
    "first": 128,
    "monthly": 120,
    "overdue_ref": null,
    "ending_at": null,
    "ended_at": null,
    "paid_count": 2,
    "last_paid": "2027-01-01 08:00:14",
    "term_ends": "2027-06-01 08:00:00",
    "held_until": "2027-06-01 08:00:00"
  }
}
Field Type Meaning
data.gateway string The payment method the plan runs on: stripe
data.kind string fixed for a set number of months, rolling for a plan that carries on until cancelled
data.months integer Number of monthly payments
data.first number The first payment, which carries any booking fee
data.monthly number Each following payment
data.overdue_ref string|null The provider’s reference of a monthly payment that failed and has not been paid since, else null
data.ending_at string|null UTC datetime a cancelled rolling plan stops, once Stripe has confirmed it
data.ended_at string|null UTC datetime the plan stopped
data.paid_count integer Monthly payments completed so far
data.last_paid string|null UTC datetime of the last one
data.term_ends string The entry plus months months, in the site’s time zone
data.held_until string The booking’s exit, in the site’s time zone

Errors

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

Plus the errors every endpoint can return.

Examples

curl -s "https://your-site.example/wp-json/plugixa-car-parking/v1/bookings/57/installments" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-car-parking/v1/bookings/57/installments');
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 response = await fetch('https://your-site.example/wp-json/plugixa-car-parking/v1/bookings/57/installments', {
  headers: {
    'Authorization': 'Basic ' + btoa(`admin:${process.env.WP_APP_PASSWORD}`),
  },
});
const { data } = await response.json();

Quick Links

Share