Yes, you have to pay when the order is placed. I have ordered a month out before. I have also ordered 8 or 9 days out. I would not try to go under that. As the day gets closer they will have fewer times available and I have seen them post "no more availability" notices before.
If you're ready to pay, I'd probably do it 4 weeks out. That way it's off your "to do" list. Then also if you need to make changes you have more time. Although I'm not 100% sure they allow changes. Have fun on your trip.