Security Deposit hold

Hi there!
I can’t find documentation on how the security deposit can be kept.

For a host/vendor, if they charged a security deposit and then need to keep all or some of the deposit, how do they stop the automatic refund and indicate how much they choose to keep and why?


Please check this topic Hold security deposits instead of charging/refunding

Hi, I’m sorry, that’s not what I was asking.

A security deposit should be able to kept my the lender in the event that there is an issue (damage, loss, etc.) during the booking. How does the host choose not to let the security deposit be returned to the user in that case?


Unfortunately, this option is not yet available on the frontend, but we plan to add it. Currently, it is possible to do this manually only through the administrator (by changing the status of the order, and thereby stopping the return of the deposit).

Can you provide a step by step of how this would be done, by logging in (access sent to support email from boroughborrow) and reviewing an order and recording the steps? I don’t know what status to set it to or what steps to take in changing the order status to ensure the security deposit is NOT refunded.

Can you also let me know where on the roadmap the frontend control for this is?

There’s no purpose in having a security deposit if it can’t be kept in the event of damage.

What plugins do you recommend that can support this functionality in the mean time?

Additionally, can you confirm the order of operations below, so I can ensure my users have time to request keeping a SD?

  1. Booking request is made. Host receives Request email.
  2. Booking is approved by host, triggering an order with status set to Pending Payment. User gets email of Booking Accepted.
  3. User provides payment. User and host receive Booking Confirmed email. Order changes status to “Processing”.
  4. Order stays in “processing” until the host clicks “complete” on the order OR until the completion period (set in settings) ends.

Please carefully verify → The completion period, when set, is calculated from the end (??) of the rental period. EX: If rental period is from 1/1/2023 to 1/2/2023 and the completion period is 2 days, then the order would automatically change to complete on 1/4/2023.


You just need to avoid the booking agency getting the completed status, and then there will be no deposit refund because it is the receipt of the completed status that triggers the deposit refund.

The steps you have described are almost correct, except that an order is not created when the request receives the approved status but only when payment is made. Also, please note that you do not need to manually complete the order or specify an auto-completed period because when the booking gets the completed status, you will have 12 hours before the order gets the completed status, and during this time, for example, you can prevent the completed status for the order by switching its status to cancel.

Thanks Andrii, but I definitely need a lot more information.

  1. How can I keep a booking from getting marked complete (per your note above)? Or did you mean keeping the order from being marked complete?

  2. In Settings > Orders, there is a Completion Period field. If orders always get completed 12 hours after the booking is completed, then why have this field?

  3. I need to extend the time from 12 hours, so that hosts have enough time to review their items and ensure there is no damage, and then submit a support ticket to keep the security deposit from being refunded in the event of damage. Can you provide code to do that?

  4. Can you also let me know where on the roadmap fixing the security deposit issues is? It should work where a host can report an issue and make a request to retain the SD, preventing the refund, according to T&Cs.

  5. What plugins do you recommend that can support the security deposit full functionality in the mean time?

Please please please be as thorough as possible in your responses, since we’ve been going back and forth about this for days. I just need a solution that is client friendly and makes the security deposit work as it should.


  1. Please use this PHP snippet:
    This snippet removes the auto-complete of the booking, which in turn stops the auto-complete of the order and the refund of the deposit.
	function($booking_id, $new_status, $old_status, $booking){
		if ( 'publish' === $new_status ) {
			hivepress()->scheduler->remove_action( 'hivepress/v1/models/booking/complete', [ $booking->get_id() ] );
  1. This function should be used if you have only the Marketplace extension, without Bookings, if you have the Bookings extension, you do not need to enter data there.

  2. Unfortunately, this is impossible in this version, but we plan to add these settings in future updates.

  3. Unfortunately, there is no exact timeframe, but we plan to release a new update for the Bookings extension this week.

  4. Unfortunately, we do not have such extensions. You can try plugins from WooCommerce, but please note that you may need additional integration.

Thank you so much for the snippet, but that won’t work. :frowning:

I’m just trying to find a way to make this work for users.


  1. User orders item and pays security deposit.
  2. User uses item and damages it.
    3… User returns item to host. Booking is set to complete at the end of the booking period.
  3. Host realizes that item is damaged, and needs to keep the security deposit because of the damage.
  4. → No solution for this. What can I do??

If I use the php snippet above:

  1. User orders item and pays security deposit.
  2. User uses item and damages it.
    3… User returns item to host.
  3. Host realizes that item is damaged, and needs to keep the security deposit because of the damage, so I choose not to move booking to complete. This causes confusion for users and hosts because in their booking tab and in their order tab, the status doesn’t show as complete.
  4. I have to then manually close out all of the orders that don’t need their refund kept, which will be the majority.

Neither of these options will work. There has to be a way to keep the security deposit from being refunded, without hacking it. What could fix this or what creative solution will solve this? We can’t have a security deposit option that doesn’t work.

Is there a way to add a charge to a completed order after it has been processed, in the event of damage?

Please answer all qs!

Hey @ihor or @andrii, following up here! Thanks!

@andrii and @ihor, following up again?

Thank you for waiting.

A possible solution can be adding a contact form where vendors can ask you to complete an order. Using the last code snippet prevents orders from being completed, and you can do it manually if the vendor confirms it.

Also, it is possible to extend the time from 12 hours to give vendors more time to check bookings. If the vendor wants to get a deposit then the vendor can cancel the booking and the deposit will not automatically returned to the user.


  1. Orders have to be able to be marked complete for record keeping. I can’t just leave orders open just because the security deposit needed to be kept by the vendor.

  2. We can’t cancel the bookings. Record keeping won’t allow falsely reflecting the status of the booking or the order.

There absolutely has to be a way to either 1) charge damage fees or 2) to stop the auto-refund. Please help.


  1. If you change the order status to canceled (not open), then there should be no auto-refund. You can also use a snippet to stop the auto-refund of the deposit.

  2. Also, by the end of the month, we plan to release a feature: the vendor can request a deposit for non-completed orders on the order page using the corresponding button. In this case, the deposit will not be automatically returned to the user after the order is executed.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.