250-357-9267 [email protected]

There is no standard button in PayPal that lets you do recurring donations; you can do single donations, and you can also do recurring payments or subscriptions, but not the two combined.

But, with a little tweaking of the PayPal button code we can still accomplish a recurring donation button, here’s how…

1. Create a subscription button through your PayPal account.

  • Add a drop down menu called Donation Frequency with Monthly/Yearly options
  • Add a text field called Enter Your Donation Amount
  • You will have to enter an amount but don’t worry about it, we’ll edit that later on anyways, just enter 1.00
  • Choose Never for when billing should stop
  • Before you click Create Button at the bottom, click on Step 2: Track Inventory etc. and uncheck the Save Button at PayPal option.
  • Now you can click Create Button

2. Click Remove Code Protection in the upper right hand corner, then copy the code and paste it into any plain text document so that we can edit it.  Here’s what the original code would look like as an example:

<form action=”https://www.paypal.com/cgi-bin/webscr” method=”post”>
<input type=”hidden” name=”cmd” value=”_xclick-subscriptions”>
<input type=”hidden” name=”business” value=”[email protected]”>
<input type=”hidden” name=”lc” value=”CA”>
<input type=”hidden” name=”item_name” value=”Donation to Your Company”>
<input type=”hidden” name=”no_note” value=”1″>
<input type=”hidden” name=”no_shipping” value=”1″>
<input type=”hidden” name=”src” value=”1″>
<input type=”hidden” name=”a3″ value=”1.00″>
<input type=”hidden” name=”p3″ value=”1″>
<input type=”hidden” name=”t3″ value=”M”>
<input type=”hidden” name=”currency_code” value=”CAD”>
<input type=”hidden” name=”bn” value=”PP-SubscriptionsBF:btn_subscribeCC_LG.gif:NonHosted”>
<table>
<tr><td><input type=”hidden” name=”on0″ value=”Donation Frequency”>Donation Frequency</td></tr><tr><td><select name=”os0″>
<option value=”Monthly”>Monthly </option>
<option value=”Annually”>Annually </option>
</select> </td></tr>
<tr><td><input type=”hidden” name=”on1″ value=”Enter Your Donation Amount”>Enter Your Donation Amount</td></tr><tr><td><input type=”text” name=”os1″ maxlength=”200″></td></tr>
</table>
<input type=”image” src=”https://www.paypalobjects.com/en_US/i/btn/btn_subscribeCC_LG.gif” border=”0″ name=”submit” alt=”PayPal – The safer, easier way to pay online!”>
<img alt=”” border=”0″ src=”https://www.paypalobjects.com/en_US/i/scr/pixel.gif” width=”1″ height=”1″>
</form>

3. Now it’s time to edit the code.  Edit this line so that the value equals the email address that is associated with your PayPal account.:
<input type=”hidden” name=”business” value=”[email protected]”>

4. Edit this line so that the value equals whatever you want, keeping in mind that this is what the end-user will see when they are sent to the checkout in PayPal:
<input type=”hidden” name=”item_name” value=”Donation to Your Company”>

5. Add this line directly after the item_name line:
<input type=”hidden” name=”item_number” value=”1234″>

6. Remove this line:
<input type=”hidden” name=”a3″ value=”1.00″>

7. Remove this line:
<input type=”hidden” name=”t3″ value=”M”>

8. Edit this section:
<tr><td><input type=”hidden” name=”on0″ value=”Donation Frequency”>Donation Frequency</td></tr><tr><td><select name=”os0″>
<option value=”Monthly”>Monthly </option>
<option value=”Annually”>Annually </option>
</select> </td></tr>

So that it looks like this:
<tr><td>Donation Frequency</td></tr><tr><td><select name=”t3″>
<option value=”M”>Monthly</option>
<option value=”Y”>Annually</option>
</select> </td></tr>

9. Edit this section:
<tr><td><input type=”hidden” name=”on1″ value=”Enter Your Donation Amount”>Enter Your Donation Amount</td></tr><tr><td><input type=”text” name=”os1″ maxlength=”200″></td></tr>

So that it looks like this:
<tr><td>Enter Your Donation Amount</td></tr>
<tr><td><input type=”text” name=”a3″ maxlength=”60″></td></tr>

Now your entire code should look like this:

<table>
<tr>
<td>
<form action=”https://www.paypal.com/cgi-bin/webscr” method=”post”>
<input type=”hidden” name=”cmd” value=”_xclick-subscriptions”>
<input type=”hidden” name=”business” value=”[email protected]”>
<input type=”hidden” name=”lc” value=”CA”>
<input type=”hidden” name=”item_name” value=”Donation to Your Company”>
<input type=”hidden” name=”item_number” value=”1234″>
<input type=”hidden” name=”no_note” value=”1″>
<input type=”hidden” name=”no_shipping” value=”1″>
<input type=”hidden” name=”src” value=”1″>
<input type=”hidden” name=”p3″ value=”1″>
<input type=”hidden” name=”currency_code” value=”CAD”>
<input type=”hidden” name=”bn” value=”PP-SubscriptionsBF:btn_subscribeCC_LG.gif:NonHosted”>
<table>
<tr><td>Donation Frequency</td></tr><tr><td><select name=”t3″>
<option value=”M”>Monthly</option>
<option value=”Y”>Annually</option>
</select> </td></tr>
<tr><td>Enter Your Donation Amount</td></tr>
<tr><td><input type=”text” name=”a3″ maxlength=”60″></td></tr>
</table>
<input type=”image” src=”https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif” border=”0″ name=”submit” alt=”PayPal”>
<img alt=”PayPal” border=”0″ src=”https://www.paypal.com/en_US/i/scr/pixel.gif” width=”1″ height=”1″>
</form>
</td>
</tr>
</table>

Voila!

Keep in mind that you will unfortunately have to have single donations separate, but at least we can create the button for that automatically in PayPal and not have to edit any code.