  In favourable conditions, the density of transiting planets in multiple
systems can be determined from photometry data alone. Dynamical information can
be extracted from light curves, providing modelling is done self-consistently,
i.e. using a photodynamical model, which simulates the individual photometric
observations instead of the more generally used transit times. We apply this
methodology to the Kepler-138 planetary system. The derived planetary bulk
densities are a factor of 2 more precise than previous determinations, and we
find a discrepancy in the stellar bulk density with respect to a previous
study. This leads, in turn, to a discrepancy in the determination of masses and
radii of the star and the planets. In particular, we find that interior planet,
Kepler-138b, has a size in between Mars and the Earth. Given our mass and
density estimates, we characterize the planetary interiors using a generalized
Bayesian inference model. This model allows us to quantify for interior
degeneracy and calculate confidence regions of interior parameters such as
thicknesses of the core, the mantle, and ocean and gas layers. We find that
Kepler-138b and Kepler-138d have significantly thick volatile layers and that
the gas layer of Kepler-138b is likely enriched. On the other hand, Kepler-138c
can be purely rocky.
