Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Johnston907's avatar

Making files downloadable only after purchase

I have a website I’ve created for a client, and I’ve created an MP3 player to play samples music. I Have links to downloadable files for the full versions of the songs. How can I make the files downloadable only after purchase? I also don’t have a purchase method set up. I’ve heard stripe is a pretty good method?

0 likes
1 reply
Tangente's avatar

In database, have a path to full mp3, just like you do for the sample one. Once the customer buys that ID, then redirect them to the page with full path.

Yes, stripe can handle all payment stuff, and once the payment succeeds then redirect them to page with full path of mo3

Please or to participate in this conversation.