Throughout the New Testament only Believers were baptized. This means that baptism followed conversion (repentance from sin and confession of Jesus Christ as Lord).
The conditions found in the Bible for baptism are 1) repentance of sin and 2) faith in Jesus Christ. This sequence is important: baptism following conversion. We call this “Believer’s Baptism”.