China seismoelectromagnetic satellite (CSES) is the first space-based platform of three-dimensional earthquake monitoring system in china. Plasma analyzing package (PAP) is one of scientific payloads aboard on CSES, which is the first application to the field of Chinese satellite. The main scientific objective of PAP is to measure ion density, ion temperature, ion composition and ion drift velocities (parallel and perpendicular to the direction of the satellite flight on orbit), and ion density fluctuation in the ionosphere. The PAP payload is composed of four parts, including retarding potential analyzer (RPA), ion drift meter, ion capture meter, and metal plate. The RPA is used to test ion density, ion temperature, ion composition and ion drift velocity (parallel to the direction of the satellite flight on orbit). The detailed design process of the sensor of RPA is described in this paper. The grid of RPA sensor is made of Beryllium copper, plated with gold to ensure uniform surface work function, and to prevent space atomic oxygen from eroding. The design value of the transmission rate of grid is 82.64%1.4%, with taking into account the Debye length on the orbit of satellite. And the total transmission rate of multilayer grid for RPA is verified by SIMON simulation experiment. To ensure the accuracy of RPA, the radii of sensor window and sensor collector are designed to be 20 mm and 50 mm respectively, and the height of sensor is 20 mm. The sweeping voltage ranges from -2 V to 20 V. And the step of sweeping voltage is adjustable between 0.056 and. 179 V. In this paper electronic design of RPA is also discussed. The electronic box is composed of preamplifier circuit, digital logical circuit, satellite interface circuit, etc. The sweeping voltage and the signal acquisition are controlled by field-programmable gate array. The design of three measurement ranges in digital logical circuit improves RPA measurement accuracy, which is better than 1.3% in the full range. In addition, the method of testing the plasma environment and the testing results are introduced. The plasma environment test of the RPA payload is carried out in INAF-IAPS. The performance of ion density measurement is validated by testing different ion densities in a vacuum tank, through changing three different distances between RPA and the plasma source. And the ion drift velocity measurement is verified by testing three different ion energies of the plasma source. Furthermore, the RPA test data are consistent with the test data from the INAF-IAPS reference RPA. The experimental results show that the detector has good performances and will contribute much to monitoring the space plasma parameters.