During daily amino acid metabolism, acids (mostly in the form of phosphates) are produced and must be eliminated. This is done via the kidney, which eliminates hydrogen in exchange for generating new bicarbonate as follows:
1) In the proximal tubule, hydrogen excretion is linked to sodium absorption. Carbonic anhydrase generates hydrogen and bicarbonate. The hydrogen is actively excreted into the renal tubular lumen, in exchange for sodium being absorbed, where it combines with filtered hydrogen phosphate, eliminating this acid. A luminal sodium/hydrogen antiporter controls this exchange (and is stimulated by angiotensin II). The generated bicarbonate is absorbed with sodium by a basolateral sodium/bicarbonate cotransporter (the energy for which is provided by the Na/K ATPase pump; Angiotensin II also stimulates the basolateral sodium/bicarbonate cotransporter).
2) In the collecting tubules, bicarbonate is generated from carbonic anhydrase but hydrogen is actively secreted (not in exchange for sodium) by a hydrogen ATPase. The bicarbonate generated by carbonic anhydrase enters the interstitial fluid (then blood) in exchange for chloride, with a basolateral chloride/bicarbonate exchanger (the energy for this pump comes from a basolateral sodium/potassium pump, not shown). Aldosterone stimulates hydrogen excretion and bicarbonate resorption by stimulating the luminal hydrogen ATPase and the basolateral chloride/bicarbonate exchanger.
In this way, a new bicarbonate is generated (there is a net gain of bicarbonate!). The amount of filtered phosphate depends on the serum phosphate and glomerular filtration rate. In a normal animal, the amount of filtered phosphate is relatively constant. This method of generating bicarbonate (and excreting acid) is not how the kidney responds to an acidemia (this is done via renal ammoniagenesis).