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.
1. On the product page
Section titled “1. On the product page”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)
2. Line-item properties
Section titled “2. Line-item properties”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)”| Property | Example |
|---|---|
Rental pickup | 2026-10-14 |
Rental return | 2026-10-17 |
Rental duration | 3 days |
Rental quote | $45.00 |
Selected add-ons | Insurance (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)”| Property | Purpose |
|---|---|
_rental_start | Canonical start date (ISO) |
_rental_end | Canonical end date (ISO) |
_rental_days | Duration in days |
_rental_total | Authoritative total |
_rental_deposit | Deposit amount |
_rental_addons | JSON blob of picked add-ons |
_rental_currency | Currency 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.
3. In the cart
Section titled “3. In the cart”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_daysif the cart was loaded from a session with a differentdays. - Add cart-level note attributes summarising rentals in the cart (
Rental window,Rental total). - Call
/apps/rental/reserveto create aCHECKOUT / PENDINGbooking 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.
4. At checkout
Section titled “4. At checkout”Shopify’s native checkout runs. Rentshelf does not intercept checkout — taxes, shipping, discounts and payment gateways all work as normal.
5. When the order is placed
Section titled “5. When the order is placed”The orders/create webhook fires. Rentshelf:
- Reads the line-item properties from the order payload.
- Rebuilds the
Bookingfrom properties (authoritative — the internal_rental_*properties win over the visible ones in case of any drift). - Links the booking to the Shopify order (
orderId,orderName). - Sets booking status based on order payment status:
PAID→CONFIRMEDPENDING(manual) /PARTIALLY_PAID→PENDING
- Adds an order tag
rentaland attaches order attributes (Rental booking,Rental window,Rental total). - Cleans up any duplicate
CHECKOUTbookings created during the hold phase.
6. When the order is cancelled
Section titled “6. When the order is cancelled”The orders/cancelled webhook fires and related bookings move to CANCELLED. Dates immediately free up.
Refunds
Section titled “Refunds”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.
Known limitations
Section titled “Known limitations”- Variant price must equal per-day rate (for
DAILYmode). 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. - 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.
- Gift cards work normally — they apply to the rental total.
- Local pickup / delivery rates work normally. Shipping rates are computed from the order total as usual.
Related
Section titled “Related”- App proxy endpoints — the
reserve,configandquoteendpoints used by the storefront picker. - Webhooks & data — how orders sync into bookings.