; or (5) is guaranteed for the benefit of a veteran. 6. Housing counseling requirement (a) In general Except as provided pursuant to section 3, assistance with grant amounts under this Act may not be provided on behalf of qualified homebuyer unless such homebuyer has completed a program of counseling with respect to the responsibilities and financial management involved in homeownership before entering into a sales purchase agreement or loan application, except as provided under subsection (c), as the Secretary shall require, provided through a counseling agency approved by the Secretary. Such program may be delivered in-person, virtually, by telephone, or any other method the Secretary determines acceptable and shall include providing information on fair housing rights and on the availability of post-purchase housing counseling opportunities and instruction on how to file a fair housing complaint. (b) Alternative requirement The Secretary shall provide that if a qualified homebuyer is unable to complete the requirement under subsection (a) within 30 days due to housing counseling agency capacity issues, a State or eligible entity may allow such qualified homebuyer to complete alternative homebuyer education to fulfill the requirement under subsection (a), including homebuyer education that is provided through an online platform, and such qualified homebuyer shall be made aware of the availability of post-purchase housing counseling opportunities. (c) Referral upon mortgage denial The Secretary shall require that any qualified homebuyer who has completed a counseling program referred to in subsection (a) or alternative requirement pursuant to subsection (b), who receives a commitment for assistance with grant amounts under this Act and who applies for an eligible mortgage loan for acquisition of an eligible home and is denied such mortgage loan, shall be referred to a counseling agency described in subsection (a) for counseling relating to such denial and for re-qualification. An eligible homebuyer may be