GO:0050968: detection of chemical stimulus involved in sensory perception of pain
The series of events involved in the perception of pain in which a chemical stimulus is received and converted into a molecular signal.