Renta Docs

Deposits API

Place, capture, and release authorization holds for rental deposits.

The Deposits API manages security deposit authorization holds via Stripe. Place a hold on the customer's card at booking, then capture (charge) or release (refund) it when the rental is returned.

Deposit Lifecycle

Hold → [Rental Period] → Capture (damage) or Release (no damage)
StatusDescription
pendingHold initiated, awaiting Stripe confirmation
heldAuthorization hold active on card
capturedFull or partial amount charged
partial_capturedPart of the hold was captured
releasedHold released, no charge
failedHold failed (e.g., insufficient funds)

Place Hold

POST /v1/deposits/hold

Places an authorization hold on the customer's payment method.

Body Parameters:

ParameterTypeRequiredDescription
booking_idstringAssociated booking
amountintegerHold amount in cents
payment_method_idstringStripe payment method ID
const hold = await renta.deposits.hold({
  booking_id: 'bk_def456',
  amount: 15000,
  payment_method_id: 'pm_stripe_123',
});

console.log(`Deposit ID: ${hold.deposit_hold_id}`);
console.log(`Amount: $${(hold.amount / 100).toFixed(2)}`);
curl -X POST https://api.getrenta.io/v1/deposits/hold \
  -H "Authorization: Bearer renta_sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "booking_id": "bk_def456",
    "amount": 15000,
    "payment_method_id": "pm_stripe_123"
  }'

Response:

{
  "success": true,
  "deposit_hold_id": "dep_abc123",
  "payment_intent_id": "pi_stripe_hold_123",
  "client_secret": "pi_stripe_hold_123_secret_xyz",
  "amount": 15000
}

Error Responses

StatusTypeWhen
402payment_failedCard declined or insufficient funds
404not_foundBooking or payment method not found

Capture Deposit

POST /v1/deposits/capture

Capture all or part of a held deposit (e.g., for damage).

Body Parameters:

ParameterTypeRequiredDescription
deposit_idstringDeposit hold ID
amountintegerAmount to capture in cents (can be less than hold amount)
// Capture $50 of a $150 hold for minor damage
await renta.deposits.capture({
  deposit_id: 'dep_abc123',
  amount: 5000,
});
curl -X POST https://api.getrenta.io/v1/deposits/capture \
  -H "Authorization: Bearer renta_sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "deposit_id": "dep_abc123",
    "amount": 5000
  }'

Response:

{
  "success": true,
  "captured_amount": 5000
}

You cannot capture more than the held amount. Attempting to capture a deposit that's already been released returns 409 Conflict.

Release Deposit

POST /v1/deposits/release

Release a held deposit back to the customer (no damage).

Body Parameters:

ParameterTypeRequiredDescription
deposit_idstringDeposit hold ID
await renta.deposits.release({
  deposit_id: 'dep_abc123',
});
curl -X POST https://api.getrenta.io/v1/deposits/release \
  -H "Authorization: Bearer renta_sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"deposit_id": "dep_abc123"}'

Response:

{
  "success": true
}

Deposits can be configured to auto-release on booking completion. Set deposit_auto_release: true on the fleet item. Auto-release is processed by a cron job that runs every hour.