Maybe like this:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
    Dim i As Long
    
    With Worksheets("Payment1")
        For i = 3 To .Cells(.Rows.Count, "C").End(xlUp).Row
            .Rows(i).Hidden = .Cells(i, "F").Value = 0
        Next i
    End With
End Sub