Disclosed herein is a method of making an apparatus suitable for detecting x-ray, the method comprising: obtaining a substrate having a first surface and a second surface, wherein the substrate comprises an electronic system in or on the substrate, wherein the substrate comprises a plurality of electric contacts are on the first surface; obtaining a first chip comprising a first X-ray absorption layer, wherein the first X-ray absorption layer comprises an electrode; bonding the first chip to the substrate such that the electrode of the first X-ray absorption layer is electrically connected to at least one of the electric contacts.