The critical current Ic of single crystals of the iron pnictide superconductor BaFe2(As1−xPx)2, has been studied through measurements of magnetic hysteresis cycles. We show that the introduction of surface irregularities in the μm scale significantly increase Ic, primarily near the irreversibility magnetic field Hirr, where the surface currents are the main contribution to Ic. Such an increase is consistent with a theoretical estimate for the maximum non-dissipative current that a rough surface can sustain, based on Mathieu-Simon continuum theory for the vortex state.