Skip to content

Cart & checkout

Rentshelf uses standard Shopify orders for every booking. The product picker, cart helper and order webhooks carry rental context through Shopify without replacing checkout.

Here’s the full journey.

The rental picker collects:

  • Dates (start, end) and duration (days)
  • Duration mode (flexible range, fixed package, hourly or variant duration)
  • Add-ons selected + quantities
  • Booking deposit or security deposit (if applicable)
  • Payment option (deposit today or pay in full, when both are enabled)
  • Delivery method and customer inputs

When the customer clicks Add to cart, the picker submits a standard form action="/cart/add" with:

  • Variant ID — the first (or selected) variant of the product
  • Quantity — set according to the active duration mode. Flexible daily rentals may use days; package, hourly and deposit flows can use a fixed line quantity while rental metadata carries the authoritative quote.
  • Line-item properties — rental metadata (see below)

Rentshelf adds these properties to the cart line:

Visible (shown to the customer in cart and email)

Section titled “Visible (shown to the customer in cart and email)”
PropertyExample
Rental pickup2026-10-14
Rental return2026-10-17
Rental duration3 days
Rental quote$45.00
Selected add-onsInsurance (qty 1)
Due today$55.00 (only if deposit > 0)
Remaining balance$55.00 (booking deposits only)
Payment optionPay deposit today or Pay in full
Delivery methodCourier delivery
Rental notes(only if the product has a notes field)

Internal (prefixed with _, hidden from the customer by Shopify)

Section titled “Internal (prefixed with _, hidden from the customer by Shopify)”
PropertyPurpose
_rental_startCanonical start date (ISO)
_rental_endCanonical end date (ISO)
_rental_daysDuration in days
_rental_totalAuthoritative total
_rental_depositDeposit amount
_rental_due_todayAmount that should be charged today
_rental_remaining_balanceBalance due after checkout
_rental_payment_optionDeposit or pay-in-full choice
_rental_addonsJSON blob of picked add-ons
_rental_currencyCurrency at booking time

The webhook handler parses both visible and internal properties to build the final Booking record — visible properties are a human-friendly mirror for the cart UI and emails.

Rentshelf’s JS runs on the cart page to:

  • Hide the product’s normal sale price for Rentshelf-connected rental lines.
  • Rewrite the displayed line total using the rental quote or due-today amount.
  • Keep subtotal aligned with the rental line total so customers do not see a mismatch between cart total and checkout total.
  • Sync the line quantity to the stored _rental_days if the cart was loaded from a session with a different days.
  • Add cart-level note attributes summarising rentals in the cart (Rental window, Rental total).
  • Call /apps/rental/reserve to create a CHECKOUT / PENDING booking as a soft hold on the dates. This prevents two customers from both checking out the same rental at the same time.

The hold expires if the order isn’t placed within 60 minutes.

Shopify’s native checkout runs. Taxes, shipping, discounts and payment gateways all work as normal.

For booking deposits, the checkout total is the due today amount. The full rental quote and remaining balance are stored on the booking and order metadata for follow-up.

If automatic remaining-balance collection is enabled, Rentshelf can create a Shopify draft order payment link when the balance becomes due. This requires the draft orders permission.

The orders/create webhook fires. Rentshelf:

  1. Reads the line-item properties from the order payload.
  2. Rebuilds the Booking from properties (authoritative — the internal _rental_* properties win over the visible ones in case of any drift).
  3. Links the booking to the Shopify order (orderId, orderName).
  4. Sets booking status based on order payment status:
    • PAIDCONFIRMED
    • PENDING (manual) / PARTIALLY_PAIDPENDING
  5. Adds an order tag rental and attaches order attributes (Rental booking, Rental window, Rental total).
  6. Stores deposit, due-today, remaining-balance, payment option, delivery method and customer input details.
  7. Cleans up any duplicate CHECKOUT bookings created during the hold phase.

The orders/cancelled webhook fires and related bookings move to CANCELLED. Dates immediately free up.

Use Shopify’s native refund flow. Rentshelf doesn’t intercept refunds — refunding the rental line is the merchant’s choice (e.g. return fees, damage deductions).

The booking record is not automatically cancelled on refund. This is intentional — a partial refund might mean the rental still happened, you’re just compensating the customer. Cancel the booking manually from Rentshelf → Bookings if the rental isn’t going ahead.

  1. Cart theme support matters. If a theme strips line-item properties or overrides cart totals aggressively, test on Dawn or the Rentshelf demo theme to isolate the issue.
  2. Discounts need testing with deposits. Shopify discounts apply to the checkout amount, so confirm discount behavior for deposit-only and pay-in-full flows.
  3. Gift cards work normally — they apply to the amount collected at checkout.
  4. Local pickup / delivery rates work normally. Shipping rates are computed from the checkout total as usual.