Rental pricing, availability and security deposits
- Type
- Applies to
- Medusa v2.x
- Updated
Short answer
Medusa's official rentals tutorial prices a rental as the variant's daily price times the number of days, and blocks dates that overlap an existing pending or active rental. Hourly pricing and security deposits are custom. Deposits usually use a separate card authorization or a charge that you refund after the return.
How per-day rental pricing works in Medusa
Medusa's product rentals tutorial stores each product's regular price as the daily rate. When a customer picks dates, a custom add-to-cart workflow multiplies the variant's calculated price by the number of rental days and sets the result as the line item's Copy to clipboardunit_price. Rental items must have a quantity of 1, and non-rental products in the same cart keep their normal price.
A rental configuration per product sets Copy to clipboardmin_rental_days and an optional Copy to clipboardmax_rental_days. The tutorial also rejects dates in the past and end dates before start dates. Because pricing comes from Medusa's Pricing Module, the daily rate can differ by region or currency like any other price.
How rental availability and overlap checks work
The rentals tutorial treats a variant as unavailable when an existing rental overlaps the requested dates. Two date ranges overlap when the existing start is on or before the requested end and the existing end is on or after the requested start. The tutorial's Rental module service runs this check against rentals with a Copy to clipboardpending or Copy to clipboardactive status:
12345678const [, count] = await this.listAndCountRentals({variant_id,status: ["active", "pending"],$or: [{rental_start_date: { $lte: end_date },rental_end_date: { $gte: start_date },}],})
The check runs in three places: an availability route that the storefront date picker calls, the add-to-cart workflow (against existing rentals and other items in the same cart), and the order creation workflow. Order creation holds a lock on the cart from Medusa's Locking Module. That lock is keyed on the cart, not the variant, so two different carts completing at the same moment can both pass; add a lock keyed on the variant if that risk matters to you.
Availability is tracked per variant, so one variant represents one rentable unit. If you own five identical cameras, either create one variant per unit or change the overlap check to count rentals against a quantity. Inventory management is optional for rental variants; the tutorial shows how to restock a variant when a rental is marked as returned.
Security deposit patterns for rentals
A security deposit protects the owner against damage or late returns. Medusa has no built-in deposit feature, so every pattern below is custom work on top of your payment provider. The card hold limits come from Stripe's documentation, as of October 2026.
The hold pattern fits short rentals that end inside the authorization window. For a 2-week camera rental booked a month ahead, a hold placed at checkout expires before the return, so charge and refund or a hold placed at pickup works better.
Payment holds in Medusa's Stripe provider
Medusa's Stripe module provider authorizes the order payment at checkout and captures it later, unless you set its Copy to clipboardcapture option to Copy to clipboardtrue. That is a hold on the whole order, not a separate deposit.
Don't settle a deposit by partially capturing the order payment. As of October 2026, an open Medusa issue reports that capturing less than the authorized amount records the partial amount in Medusa while Stripe captures the full authorization. Keep the deposit in its own PaymentIntent, managed by a workflow you write.
When this approach is not the right choice
- You need hourly slots, buffers, and staff calendars without writing code. A booking plugin or scheduling SaaS covers that out of the box.
- You need deposits held longer than 30 days on a card. No card hold lasts that long; use charge and refund.
Common questions
Can Medusa price rentals per hour?
Not in the official rentals tutorial, which works in days. You can adapt it to store hours and multiply an hourly rate, which is custom work.
How long can Stripe hold a security deposit?
Stripe's documentation says online card authorizations usually last 7 days, and extended authorization reaches 30 days on eligible cards. Longer rentals need a charge and refund instead.
Does Medusa capture payments automatically?
Medusa's Stripe provider authorizes the payment at checkout and captures it later unless its capture option is set to true. Merchants capture authorized payments from the order page in Medusa Admin.
How does Medusa stop two customers renting the same item for the same dates?
The rentals tutorial checks for overlapping pending or active rentals on the date picker, on add to cart and when the order is created. The overlap check is per variant, so one variant represents one rentable unit.