26 USC 5054 - Determination and collection of tax on beer

(a) Time of determination 

(1) Beer produced in the United States; certain imported beer 
Except as provided in paragraph (3), the tax imposed by section 5051 on beer produced in the United States, or imported into the United States and transferred to a brewery free of tax under section 5418, shall be determined at the time it is removed for consumption or sale, and shall be paid by the brewer thereof in accordance with section 5061.
(2) Beer imported into the United States 
Except as provided in paragraph (4), the tax imposed by section 5051 on beer imported into the United States and not transferred to a brewery free of tax under section 5418 shall be determined at the time of the importation thereof, or, if entered for warehousing, at the time of removal from the 1st such warehouse.
(3) Illegally produced beer 
The tax on any beer produced in the United States shall be due and payable immediately upon production unless
(A) such beer is produced in a brewery qualified under the provisions of subchapter G, or
(B) such production is exempt from tax under sections[1] 5053(e) (relating to beer for personal or family use).
(4) Unlawfully imported beer 
Beer smuggled or brought into the United States unlawfully shall, for purposes of this chapter, be held to be imported into the United States, and the internal revenue tax shall be due and payable at the time of such importation.
(b) Tax on returned beer 
Beer which has been removed for consumption or sale and is thereafter returned to the brewery shall be subject to all provisions of this chapter relating to beer prior to removal for consumption or sale, including the tax imposed by section 5051. The tax on any such returned beer which is again removed for consumption or sale shall be determined and paid without respect to the tax which was determined at the time of prior removal of the beer for consumption or sale.
(c) Applicability of other provisions of law 
All administrative and penal provisions of this title, insofar as applicable, shall apply to any tax imposed by section 5051.
[1] So in original. Probably should be “section”.