Skip to main content

Pricing & Payments

SpaceOS supports flexible pricing models and Stripe-powered payment processing.

Calculate Price

POST /api/v1/pricing/calculate
Content-Type: application/json

{
"meeting_space_id": "ms-abc123",
"start_time": "2025-01-15T10:00:00Z",
"end_time": "2025-01-15T11:00:00Z",
"voucher_code": "WELCOME20"
}

Response:

{
"data": {
"base_price": 50.00,
"discount": 10.00,
"total": 40.00,
"currency": "USD"
}
}

Pricing Modes

ModeDescription
FixedSet price per booking increment
HourlyPrice per hour
DynamicRules-based pricing varying by time of day, day of week, or demand

Dynamic Pricing Rules

Dynamic pricing rules can adjust the base price:

  • Time-of-day — Peak vs. off-peak rates
  • Day-of-week — Weekend vs. weekday pricing
  • Custom rules — Organization-defined pricing logic

Stripe Integration

SpaceOS uses Stripe for payment processing.

Payment Flow

  1. Calculate price via /api/v1/pricing/calculate
  2. Create booking with payment intent
  3. Stripe processes the payment
  4. Webhook from Stripe confirms payment status
  5. Booking moves from pending to confirmed

Stripe Webhook

POST /api/v1/webhooks/stripe

Handles Stripe events (payment success, failure, refund).

Vouchers

Vouchers provide discounts on bookings.

Validate Voucher (Public)

POST /api/v1/vouchers/validate
Content-Type: application/json

{
"code": "WELCOME20",
"meeting_space_id": "ms-abc123"
}

Refunds

POST /api/v1/refunds
Authorization: Bearer <jwt>
Content-Type: application/json

{
"booking_id": "bk-abc123",
"amount": 40.00,
"reason": "Customer request"
}

Next Steps