Php Example - https://gourl.io/lib/examples/pay-per-download-multi.php
Source code - https://gourl.io/vertcoin-payment-gateway-api.html#p2
.
Your website visitors will need to send you a set amount of cryptocoins for every file download, which they make from your website. You can use the received cryptocoins to support your website, etc.