This paper jointly optimizes the zoning, scheduling, and pricing of a zonal-based flexible bus service (ZBFBS). ZBFBS categorizes and groups the origin-destination (OD) pairs of ride requests by geographical zones to provide door-to-door transit services while considering dynamic stochastic elastic demand volume, stochastic ride request locations, and time window constraints. The integrated problem can be formulated in two ways, either by designing the bus service routing in response to the realized demand, referred to as the demand-responsive method, or by a stochastic programming approach that accounts for the demand distribution. The former first clusters the realized requests into zones through the k-means algorithm, and then solves the joint vehicle scheduling and passenger assignment problem. As for the latter, a bi-level framework is proposed: the upper level optimizes the zoning, and the lower level maximizes the profit by scheduling and pricing the ZBFBS service. For this purpose, hexagonal and rectangular zonings are considered, whose positions and dimensions are optimized by a line search algorithm, with a deterministic approximation approach to significantly reduce the solution time. This framework is applied to a scenario based on actual ride-hailing data in Chengdu, China. The results demonstrate the benefit of the bi-level framework in producing an optimal zonal design. Also, the proposed bi-level stochastic zonal design framework outperforms the demand-responsive method in a tight planning time.