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
| Mode | Description |
|---|---|
| Fixed | Set price per booking increment |
| Hourly | Price per hour |
| Dynamic | Rules-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
- Calculate price via
/api/v1/pricing/calculate - Create booking with payment intent
- Stripe processes the payment
- Webhook from Stripe confirms payment status
- Booking moves from
pendingtoconfirmed
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
- Users & Roles — Access control for payment management
- Bookings — Booking lifecycle