At the point that they make a purchase, generate a unique identifier and incorporate this in the URL.
Then when that URL is visited, lookup the code, see when it was created and how many times its been used, and either send the content or an error, accordingly.
To expand on this:
User visits your site, buys somecontent.txt, and pays their money. You then generate a random string and give them a link that looks like:
www.yoursite.com/download?content=somecontent.txt&authKey=fdkjhwsiufhwaoeuhfq
where the string at the end is the one you generated, and stored in the DB.
At some time later, the buyer uses the link. Your code then goes 'Aha! - that code was created as a result of the user Fred buying some content. His payment was received, and its the first time its been downloaded, so I'll send him the file, and increment the counter that records how many times that specific user has used that specific code.
Eventually, due to either a time expiry, or having been used too many times, your code will instead turn around and say 'Sorry Fred, that link is too old/has been used too many times'...at which point they can re-buy the content, for example, at which point you can generate a new code.