The high efficiency, low background, and single-photon detection with transition-edge sensors (TES) is making this type of detector attractive in widely different types of applications. In this paper, we present first characterizations of a TES to be used in the Any Light Particle Search (ALPS) experiment searching for new fundamental ultra-light particles. Firstly, we describe the setup and the main components of the ALPS TES detector (TES, millikelvin-cryostat and SQUID readout) and their performances. Secondly, we explain a dedicated analysis method for single-photon spectroscopy and rejection of non-photon background. Finally, we report on results from extensive background measurements. Considering an event selection, optimized for a wavelength of 1064nm, we achieved a background suppression of similar to 10(-3) with a similar to 50\% efficiency for photons passing the selection. The resulting overall efficiency was 23\% with a dark count rate of 8.6 x 10(-3) s(-1). We observed that pile-up events of thermal photons are the main background components.