The astrophysical factor of 8 B(p,γ) 9 C at zero energy, S18(0), is determined by a three-body coupled-channels analysis of the transfer reaction 8 B(d,n) 9 C at 14.4 MeV/nucleon. Effects of the breakup channels of d and 9 C are investigated with the continuum-discretized coupled-channels method. It is found that, in the initial and final channels, respectively, the transfer process through the breakup states of d and 9 C, its interference with that through their ground states in particular, gives a large increase in the transfer cross section. The finiterange effects with respect to the proton-neutron relative coordinate are found to be about 20%. As a result of the present analysis, S18(0) = 22 ± 6 eV b is obtained, which is smaller than the result of the previous distorted-wave Born approximation analysis by about 51%.