Skip to content

Cart & checkout

Rentshelf uses standard Shopify orders for every booking. No draft orders, no separate checkout, no cart transform Functions. This is a deliberate design choice so the app stays compatible with all themes, payment gateways, taxes, discounts and fulfilment apps.

Here’s the full journey.

The rental picker collects:

  • Dates (start, end) and duration (days)
  • Add-ons selected + quantities
  • Deposit (if applicable)

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 to days (not 1). This makes Shopify’s native line total = variant price × days, which matches the rental total when variant price equals the per-day rate.
  • 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)
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_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:

  • Rewrite the displayed line price using Rental quote (so the customer doesn’t see “qty 4 × $10”).
  • 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. Rentshelf does not intercept checkout — taxes, shipping, discounts and payment gateways all work as normal.

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. 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. Variant price must equal per-day rate (for DAILY mode). Rentshelf enforces this by syncing variant prices when you save in the admin. If you change variant prices outside the app, line totals will drift. Avoid this.
  2. Quantity-based approach doesn’t work for some discount codes. Shopify discount codes priced per-line are unaffected. But a discount like “10% off if quantity ≥ 3” would trigger on a 3-day rental unexpectedly. Use discount codes with caution or disable them for rental products.
  3. Gift cards work normally — they apply to the rental total.
  4. Local pickup / delivery rates work normally. Shipping rates are computed from the order total as usual.