We estimate the differential and total cross sections for both the photopro
duction of a vector D* mason and its yield in deep inelastic scattering at
the DESY HERA collider in the framework of a model motivated by perturbativ
e calculations in QCD. The offered model allows us to take into account hig
her twists over the transverse momentum of meson at p(T) similar to m(c) an
d to correctly approach the dominance of c-quark fragmentation at p(T) much
greater than m(c) We consider the possibility far the hadronization of a c
olor-octet c (q) over bar state into the meson. The combined contribution b
y the singlet and octet-color terms results in a good agreement with the ex
perimental data for both the photoproduction and production in deep inelast
ic scattering.