Pricing API
Calculate rental pricing breakdowns with discounts, seasonal rules, add-ons, and coupons.
The Pricing API calculates a complete pricing breakdown for a rental without creating a booking. Use it to preview costs at checkout.
Calculate Pricing
POST /v1/pricing/calculateBody Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
fleet_item_id | string | ✅ | Fleet item to price |
pickup_date | string | ✅ | Pickup date (ISO 8601) |
return_date | string | ✅ | Return date (ISO 8601) |
half_day | boolean | — | Half-day rental (default auto-detected) |
addons | array | — | Array of {addon_id, quantity} |
coupon_code | string | — | Coupon code to apply |
const pricing = await renta.pricing.calculate({
fleet_item_id: 'fi_abc123',
pickup_date: '2026-07-01T09:00:00Z',
return_date: '2026-07-03T17:00:00Z',
addons: [
{ addon_id: 'addon_helmet', quantity: 1 },
{ addon_id: 'addon_insurance', quantity: 1 },
],
coupon_code: 'SUMMER20',
});
console.log(`Base price: $${(pricing.base_price / 100).toFixed(2)}`);
console.log(`Seasonal adjustment: $${(pricing.seasonal_adjustment / 100).toFixed(2)}`);
console.log(`Add-ons: $${(pricing.addon_total / 100).toFixed(2)}`);
console.log(`Coupon discount: -$${(pricing.coupon_discount / 100).toFixed(2)}`);
console.log(`Subtotal: $${(pricing.subtotal / 100).toFixed(2)}`);
console.log(`Tax: $${(pricing.tax / 100).toFixed(2)}`);
console.log(`Total: $${(pricing.total / 100).toFixed(2)}`);
console.log(`Deposit hold: $${(pricing.deposit_hold_amount / 100).toFixed(2)}`);curl -X POST https://api.getrenta.io/v1/pricing/calculate \
-H "Authorization: Bearer renta_sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"fleet_item_id": "fi_abc123",
"pickup_date": "2026-07-01T09:00:00Z",
"return_date": "2026-07-03T17:00:00Z",
"addons": [
{"addon_id": "addon_helmet", "quantity": 1},
{"addon_id": "addon_insurance", "quantity": 1}
],
"coupon_code": "SUMMER20"
}'Response:
{
"base_price": 10000,
"discount_amount": 0,
"seasonal_adjustment": -500,
"addon_total": 3500,
"package_savings": 0,
"coupon_discount": 2600,
"subtotal": 10400,
"tax": 832,
"total": 11232,
"deposit_hold_amount": 15000,
"renta_fee_amount": 281,
"breakdown": {
"days": 2,
"half_day": false,
"rate_per_day": 5000,
"multi_day_discount": 0,
"seasonal_rules_applied": [
{
"rule_id": "pr_summer",
"type": "seasonal",
"adjustment_type": "percent",
"adjustment_value": -5
}
],
"coupon": {
"code": "SUMMER20",
"discount_type": "percent",
"discount_value": 20
},
"addons": [
{"addon_id": "addon_helmet", "name": "Helmet", "quantity": 1, "unit_price": 500, "total": 500},
{"addon_id": "addon_insurance", "name": "Damage Protection", "quantity": 1, "unit_price": 1500, "total": 3000}
]
}
}Pricing Pipeline
The pricing engine applies calculations in this order:
- Base rate —
price_half_day,price_full_day, orprice_multi_day× days - Multi-day discount — Automatic discount for longer rentals (if configured)
- Seasonal adjustment — Pricing rules with date ranges (dollar or percentage)
- Add-on pricing — Per-item or per-day add-on costs
- Package discount — Package bundle savings (if applicable)
- Coupon validation — Percentage or fixed discount from coupon code
- Tax calculation — Based on tenant's tax configuration
- Renta fee — Platform transaction fee (based on subscription tier)
The pricing endpoint is read-only — it doesn't create or modify any records. Use it for checkout previews and price comparison UIs.
Rate Selection
| Duration | Rate Used |
|---|---|
| < 1 day | price_half_day |
| 1 day | price_full_day |
| 2–6 days | price_multi_day × days (falls back to price_full_day if not set) |
| 7+ days | price_weekly ÷ 7 × days (falls back to price_multi_day or price_full_day) |
Half-day detection is automatic if the pickup-to-return window is ≤ 5 hours, or can be forced with half_day: true.
Pricing Rules
Manage seasonal and multi-day pricing rules that the pricing engine applies during calculation.
List Pricing Rules
GET /v1/pricing/rulesQuery Parameters:
| Parameter | Type | Description |
|---|---|---|
fleet_item_id | string | Filter rules for a specific item |
active | string | Filter by active state (true or false) |
cursor | string | Pagination cursor |
limit | integer | Results per page (1–100, default 20) |
const rules = await renta.pricing.rules.list({
fleet_item_id: 'fi_abc123',
active: 'true',
});curl "https://api.getrenta.io/v1/pricing/rules?fleet_item_id=fi_abc123&active=true" \\
-H "Authorization: Bearer renta_sk_live_..."Response:
{
"data": [
{
"id": "pr_abc123",
"fleet_item_id": "fi_abc123",
"type": "seasonal",
"start_date": "2026-06-01",
"end_date": "2026-08-31",
"days_threshold": null,
"adjustment_type": "percent",
"adjustment_value": 15,
"priority": 10,
"active": true,
"created_at": "2026-03-01T10:00:00Z",
"updated_at": "2026-03-01T10:00:00Z"
}
],
"has_more": false,
"next_cursor": null
}Get Pricing Rule
GET /v1/pricing/rules/:idconst rule = await renta.pricing.rules.get('pr_abc123');curl https://api.getrenta.io/v1/pricing/rules/pr_abc123 \\
-H "Authorization: Bearer renta_sk_live_..."Create Pricing Rule
POST /v1/pricing/rulesBody Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
fleet_item_id | string | — | Fleet item ID (null for global rules) |
type | string | ✅ | Rule type: seasonal or multi_day |
start_date | string | — | Start date for seasonal rules (ISO date) |
end_date | string | — | End date for seasonal rules (ISO date) |
days_threshold | integer | — | Minimum days for multi-day rules |
adjustment_type | string | — | dollar or percent (default percent) |
adjustment_value | integer | — | Adjustment amount (cents for dollar, whole number for percent) |
priority | integer | — | Higher priority rules apply first (default 0) |
active | boolean | — | Whether the rule is active (default true) |
const rule = await renta.pricing.rules.create({
fleet_item_id: 'fi_abc123',
type: 'seasonal',
start_date: '2026-06-01',
end_date: '2026-08-31',
adjustment_type: 'percent',
adjustment_value: 15,
priority: 10,
});curl -X POST https://api.getrenta.io/v1/pricing/rules \\
-H "Authorization: Bearer renta_sk_live_..." \\
-H "Content-Type: application/json" \\
-d '{
"fleet_item_id": "fi_abc123",
"type": "seasonal",
"start_date": "2026-06-01",
"end_date": "2026-08-31",
"adjustment_type": "percent",
"adjustment_value": 15,
"priority": 10
}'Update Pricing Rule
PATCH /v1/pricing/rules/:idAccepts any subset of the create parameters.
await renta.pricing.rules.update('pr_abc123', {
active: false,
});curl -X PATCH https://api.getrenta.io/v1/pricing/rules/pr_abc123 \\
-H "Authorization: Bearer renta_sk_live_..." \\
-H "Content-Type: application/json" \\
-d '{"active": false}'Delete Pricing Rule
DELETE /v1/pricing/rules/:idawait renta.pricing.rules.del('pr_abc123');curl -X DELETE https://api.getrenta.io/v1/pricing/rules/pr_abc123 \\
-H "Authorization: Bearer renta_sk_live_..."Response:
{
"deleted": true,
"id": "pr_abc123"
}