PayPal smart button switch to subscription / recurring donation

I’ve managed to get the PayPal smart button working, but would like to know if it’s possible to switch the payment button to a subscription programmatically after it’s been rendered? And what the best …