The discovery of the Fermi bubbles---a huge bilobular structure seen in GeV gamma-rays above and below the Galactic center---implies the presence of a large reservoir of high energy particles at $sim 10 , text{kpc}$ from the disk. The absence of evidence for a strong shock coinciding with the edge of the bubbles, and constraints from multi-wavelength observations point towards stochastic acceleration by turbulence as a likely mechanism of acceleration. We have investigated the time-dependent acceleration of electrons in a large-scale outflow from the Galactic centre. For the first time, we present a detailed numerical solution of the particle kinetic equation that includes the acceleration, transport and relevant energy loss processes. We also take into account the addition of shock acceleration of electrons at the bubbles blast wave. Fitting to the observed spectrum and surface brightness distribution of the bubbles allows determining the transport coefficients, thereby shedding light on the origin of the Fermi bubbles.