Skip to content

Website Flow

1. Public Endpoints

Endpoint Auth Description
GET /saas/plans Public Browse all published plans with period filtering
GET /saas/plans/\<url_string> Public Configure a specific plan (packages, add-ons, period)
POST /saas/plans/configure/save Public Save configuration to session (AJAX)
POST /saas/plans/configure/price Public Live price calculation with breakdown (AJAX)
GET /saas/plans/domain User Subdomain selection page
POST /saas/plans/domain/check User Check subdomain availability (AJAX)
GET /saas/plans/checkout User Order summary and checkout page
POST /saas/plans/checkout/confirm User Submit order, create sale order, redirect to payment
GET /saas/plans/confirmation/\<order_id> User Post-payment confirmation page

2. Subdomain Validation

When checking subdomain availability, the system validates:

  • Minimum 3 characters
  • Only alphanumeric characters and hyphens
  • Not already used by any subscription
  • Not already used by any stage
  • Not in the reserved domains list

3. Session-Based Configuration

The plan configuration is stored in the browser session, allowing customers to:

  • Switch between periods without losing selections
  • Navigate away and return to their configuration
  • Restore their configuration on page reload

4. Payment Integration

After checkout confirmation:

  1. A sale.order is created with the plan product and total price
  2. A payment link is generated via payment.link.wizard
  3. Customer is redirected to the payment page
  4. On successful payment, the sale order triggers subscription creation