In this article, the effect of carrier trapping at the heterointerface of a p-i-n photodetector (PD) on the frequency response and, hence, on the transit-time limited bandwidth of the PD has been investigated. The effective height of the potential barrier at the valence-band and conduction-band interfaces has been calculated as a function of bias voltage and grading layer thickness taking Al0.2Ga0.8As/GaAs structure as an example. It is shown how the results can be used to estimate the barrier height without doing exact calculations. The barrier heights are used to calculate the rate of emission of carriers from the trap by solving the rate equation. Then, an expression for the photocurrent is derived to study the frequency response of a resonant-cavity-enhanced p-i-n photodetector and hence to obtain its transit-time limited bandwidth. The results from the model are shown to be in good agreement with experimental data.