  The atmospheres of a large proportion of white dwarf stars are polluted by
heavy elements that are expected to sink out of visible layers on short
timescales. This has been interpreted as a signature of ongoing accretion of
debris from asteroids, comets, and giant planets. This scenario is supported by
the detection of debris discs and transits of planetary fragments around some
white dwarfs. However, photospheric metals are only indirect evidence for
ongoing accretion, and the inferred accretion rates and parent body
compositions heavily depend on models of diffusion and mixing processes within
the white dwarf atmosphere. Here we report a 4.4$\sigma$ detection of X-rays
from a polluted white dwarf, G29$-$38, using a 106 ks exposure with the Chandra
X-ray Observatory, demonstrating directly that the star is currently accreting.
From the measured X-ray luminosity, we find an instantaneous accretion rate of
$\dot{M_{\rm X}}=1.63^{+1.29}_{-0.40}\times 10^{9}\mathrm{\,g\,s^{-1}}$. This
is the first direct measurement of the accretion rate onto the white dwarf,
which is independent of stellar atmosphere models. This rate exceeds estimates
based on past studies of the photospheric abundances by more than a factor two,
and implies that convective overshoot has to be accounted for in modelling the
spectra of debris-accreting white dwarfs. We measure a low plasma temperature
of $kT=0.5\pm0.2\,\mathrm{keV}$, corroborating the predicted bombardment
solution for white dwarfs accreting at low accretion rates. Offering a new
method for studying evolved planetary systems, these observations provide the
opportunity to independently measure the instantaneous accretion rate of
planetary material, and therefore investigate the timescale of accretion onto
white dwarfs, and the evolution and replenishment of debris disks.
