I'm creating a paypal check-out form for a subscription service.

Paypal allows me to specify the "reacurring times" of the subscription with the "srt" option: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_Appx_websitestandard_htmlvariables

I would like to create a drop-down list that allows the customer to select either an indefinite number of times or a specific number of times.

The select would probably look like this, however, I'm unsure how to specify an unlimited duration. Should I leave the value blank, or is there a way not to send the variable through at all?:

<select name="srt">
    <option value="1"></option>  <!-- One time --> 
    <option value="9"></option>  <!-- Nine times --> 
    <option value=""></option>  <!-- Indefinitely?? --> 

I'm unsure how to handle this use case. Any help would be appreciated. Thanks!


It also looks like its impossible to specify srt="1" (the first option). When this option is selected, paypal rejects the link as invalid because a subscription service must be more than one time. From my understanding. Only wants to purchase one interval, then another option: "src" must be set to "0".

Can I do this with one html drop-down, or do I need to use javascript to respond to user input and then change hidden form values accordingly?


1 Answer 1


According to the PayPal documentation on the srt parameter:

Recurring Times. This is the number of payments which will occur at the regular rate. If omitted, payment will continue to recur at the regular rate until the subscription is cancelled

So you would have to omit the parameter to get to get recurring payments until cancelled. This means that you would need to use some JavaScript to respond to the select menu and add a hidden field to a form with this parameter when it is required.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.