{
    "requiresAuth": true,
    "requiredStages": ["REGISTRATION"],
    "conditions": [
      {
        "roles": ["ROLE_VIEWER"],
        "condition": {
          "operator": "AND",
          "conditions": [
            {"field": "requiresPayment", "operator": "EQUALS", "value": true},
            {"field": "approvalStatus", "operator": "EQUALS", "value": "approved"},
            {"field": "isFreeSeat", "operator": "EQUALS", "value": false},
            {
              "operator": "OR",
              "conditions": [
                {"field": "paymentStatus", "operator": "IN", "value": ["failed", "online_pending"]},
                {"field": "paymentStatus", "operator": "IS_NULL"},
                {
                  "operator": "AND",
                  "conditions": [
                    {"field": "paymentStatus", "operator": "EQUALS", "value": "offline_pending"},
                    {"field": "editRequestStatus", "operator": "EQUALS", "value": "requested"}
                  ]
                }
              ]
            }
          ]
        },
        "message": "Payment required after registration approval"
      },
      {
        "roles": ["ROLE_FINANCE_MANAGER", "ROLE_ADMIN", "ROLE_RELATIONAL_MANAGER"],
        "condition": {
          "operator": "AND",
          "conditions": [
            {"field": "approvalStatus", "operator": "EQUALS", "value": "approved"},
            {"field": "isFreeSeat", "operator": "EQUALS", "value": false}
          ]
        },
        "message": "Finance team can access payment processing"
      }
    ]
  }