Hyperpolarization-activated ion channel exhibiting weak selectivity for potassium over sodium ions. Contributes to the native pacemaker currents in heart (If) and in neurons (Ih). Can also transport ammonium in the distal nephron. Produces a large instantaneous current. Activated by cAMP, and at 10-100 times higher concentrations, also by cGMP. cAMP binding causes a conformation change that leads to the assembly of an active tetramer and channel opening. Channel activity is modulated by intracellular chloride ions and pH; acidic pH shifts the activation to more negative voltages. Homotetramer. Heterotetramer with HCN1. The potassium channel is composed of a homo- or heterotetrameric complex of pore-forming subunits. Forms an obligate 4:4 complex with accessory subunit PEX5L. Interacts with KCNE2. Highly expressed in brain. Detected at low levels in heart, in ventricle, atrium and in sinoatrial node (SAN). The segment S4 is probably the voltage-sensor and is characterized by a series of positively charged amino acids at every third position. Phosphorylation at Ser-641 by PRKG2 shifts the voltage-dependence to more negative voltages, hence counteracting the stimulatory effect of cGMP on gating. Belongs to the potassium channel HCN family.