Delayed compute of part of definition

We usually recommend to use boolean toggles in Grasshopper that prevent the computation of any logic that is not necessary for visualization. You can then hook any user action on your website (for example a purchase button) to a function that will first enable the boolean toggle and, once enabled, trigger the export. Something like this:

button.addEventListener("click", function(){
    api.parameters.updateAsync({name: "MyBooleanToggle", value: true}).then(function(){
           api.exports.requestAsync({name: "MyExportAsset"});
        });
    });