Conventionally the optical photosphere of a star is defined in term of its optical depth to radiation - usually the photosphere is said to be where the optical depth reaches 2/3.
The gas at this optical depth has a pressure - and this is what one would normally talk about in terms of the surface ...