Allow 30 days free and still gather payment info

I want to let people in without paying initially but still take their payment info.

How to set up so that it accepts a 30-day free trial and also takes their payment info?