# Security Deposit hold

**URL:** <https://community.hivepress.io/t/security-deposit-hold/7323>\
**Category:** Bookings\
**Tags:** marketplace, bookings\
**Created:** [September 5, 2023, 1:08pm UTC](https://community.hivepress.io/t/security-deposit-hold/7323 "2023-09-05T13:08:01Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![mzc0001](https://community.hivepress.io/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@mzc0001](https://community.hivepress.io/u/mzc0001)\
**Post date:** [September 5, 2023, 1:08pm UTC](https://community.hivepress.io/t/security-deposit-hold/7323/1 "2023-09-05T13:08:01Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![andrii](https://community.hivepress.io/user_avatar/community.hivepress.io/andrii/32/2951_2.png) [@andrii](https://community.hivepress.io/u/andrii)\
**Post date:** [September 6, 2023, 6:39am UTC](https://community.hivepress.io/t/security-deposit-hold/7323/2 "2023-09-06T06:39:41Z")

</div>

Hi,

Please check this topic [Hold security deposits instead of charging/refunding](https://community.hivepress.io/t/hold-security-deposits-instead-of-charging-refunding/2481)

---

<div class="post-metadata">

**Author:** ![mzc0001](https://community.hivepress.io/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@mzc0001](https://community.hivepress.io/u/mzc0001)\
**Post date:** [September 6, 2023, 2:22pm UTC](https://community.hivepress.io/t/security-deposit-hold/7323/3 "2023-09-06T14:22:25Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![andrii](https://community.hivepress.io/user_avatar/community.hivepress.io/andrii/32/2951_2.png) [@andrii](https://community.hivepress.io/u/andrii)\
**Post date:** [September 7, 2023, 12:24pm UTC](https://community.hivepress.io/t/security-deposit-hold/7323/6 "2023-09-07T12:24:25Z")

</div>

Hi,

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).

---

<div class="post-metadata">

**Author:** ![mzc0001](https://community.hivepress.io/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@mzc0001](https://community.hivepress.io/u/mzc0001)\
**Post date:** [September 7, 2023, 1:43pm UTC](https://community.hivepress.io/t/security-deposit-hold/7323/7 "2023-09-07T13:43:48Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![mzc0001](https://community.hivepress.io/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@mzc0001](https://community.hivepress.io/u/mzc0001)\
**Post date:** [September 7, 2023, 2:14pm UTC](https://community.hivepress.io/t/security-deposit-hold/7323/8 "2023-09-07T14:14:33Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![andrii](https://community.hivepress.io/user_avatar/community.hivepress.io/andrii/32/2951_2.png) [@andrii](https://community.hivepress.io/u/andrii)\
**Post date:** [September 8, 2023, 1:33pm UTC](https://community.hivepress.io/t/security-deposit-hold/7323/11 "2023-09-08T13:33:01Z")

</div>

Hi,

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.

---

<div class="post-metadata">

**Author:** ![mzc0001](https://community.hivepress.io/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@mzc0001](https://community.hivepress.io/u/mzc0001)\
**Post date:** [September 8, 2023, 6:41pm UTC](https://community.hivepress.io/t/security-deposit-hold/7323/12 "2023-09-08T18:41:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![andrii](https://community.hivepress.io/user_avatar/community.hivepress.io/andrii/32/2951_2.png) [@andrii](https://community.hivepress.io/u/andrii)\
**Post date:** [September 11, 2023, 2:11pm UTC](https://community.hivepress.io/t/security-deposit-hold/7323/17 "2023-09-11T14:11:16Z")

</div>

Hi,

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.

```auto
add_action( 
	'hivepress/v1/models/booking/update_status', 
	function($booking_id, $new_status, $old_status, $booking){
		if ( 'publish' === $new_status ) {
			hivepress()->scheduler->remove_action( 'hivepress/v1/models/booking/complete', [$booking->get_id()] );
		}
	}, 
	10, 
	4 
);

```

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.

---

<div class="post-metadata">

**Author:** ![mzc0001](https://community.hivepress.io/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@mzc0001](https://community.hivepress.io/u/mzc0001)\
**Post date:** [September 11, 2023, 6:29pm UTC](https://community.hivepress.io/t/security-deposit-hold/7323/19 "2023-09-11T18:29:39Z")

</div>

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

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

Currently:

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!

---

<div class="post-metadata">

**Author:** ![mzc0001](https://community.hivepress.io/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@mzc0001](https://community.hivepress.io/u/mzc0001)\
**Post date:** [September 12, 2023, 5:38pm UTC](https://community.hivepress.io/t/security-deposit-hold/7323/23 "2023-09-12T17:38:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mzc0001](https://community.hivepress.io/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@mzc0001](https://community.hivepress.io/u/mzc0001)\
**Post date:** [September 13, 2023, 1:48pm UTC](https://community.hivepress.io/t/security-deposit-hold/7323/24 "2023-09-13T13:48:03Z")

</div>

@andrii and @ihor, following up again?

---

<div class="post-metadata">

**Author:** ![yevhen](https://community.hivepress.io/user_avatar/community.hivepress.io/yevhen/32/23_2.png) [@yevhen](https://community.hivepress.io/u/yevhen)\
**Post date:** [September 14, 2023, 10:30am UTC](https://community.hivepress.io/t/security-deposit-hold/7323/25 "2023-09-14T10:30:03Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![mzc0001](https://community.hivepress.io/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@mzc0001](https://community.hivepress.io/u/mzc0001)\
**Post date:** [September 14, 2023, 7:24pm UTC](https://community.hivepress.io/t/security-deposit-hold/7323/26 "2023-09-14T19:24:27Z")

</div>

@yevhen

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.

---

<div class="post-metadata">

**Author:** ![andrii](https://community.hivepress.io/user_avatar/community.hivepress.io/andrii/32/2951_2.png) [@andrii](https://community.hivepress.io/u/andrii)\
**Post date:** [September 15, 2023, 3:09pm UTC](https://community.hivepress.io/t/security-deposit-hold/7323/29 "2023-09-15T15:09:42Z")

</div>

Hi,

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.

---

<div class="post-metadata">

**Author:** ![system](https://community.hivepress.io/user_avatar/community.hivepress.io/system/32/13990_2.png) [@system](https://community.hivepress.io/u/system)\
**Post date:** [October 15, 2023, 3:10pm UTC](https://community.hivepress.io/t/security-deposit-hold/7323/30 "2023-10-15T15:10:09Z")

</div>

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