How to record receiving a deposit for equipment hire

I recently hired a trailer from another business. I paid the rental plus the security deposit with the company credit card. When I returned the trailer, I was refunded the money in cash. How do I record this deposit? Seeing that it is cash, can I record it in my petty cash?

yes. under a cash account.