It definitely works like that. I've had some friends and family give me their codes and I'm almost up to a year's worth of Xbox Games Pass because of it.
Got one today. I thought I didn't use any CC/DC until I realized that I used debit a while back on the first month specified in that date-range. Then again, I had the card removed right after I placed my orders in said timeframe. No suspicious/fraudulant charges for me :D