Contribution Payments - Donate Buttons
Sample HTML Code for a Basic Donate Button
The sample HTML code below illustrates a basic Donate button where donors enter their own contribution amount during checkout. The code uses the currency_code variable to set the currency for the contribution amounts that donors enter.
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="info@capleswebdev.com">
<!-- Specify a Donate button. -->
<input type="hidden" name="cmd" value="_donations">
<!-- Specify details about the contribution -->
<input type="hidden" name="item_name" value="Friends of the Park">
<input type="hidden" name="item_number" value="Fall Cleanup Campaign">
<input type="hidden" name="currency_code" value="USD">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" alt="PayPal - The safer, easier way to pay online">
<img alt="" border="0" width="1" height="1" src="https://www.paypal.com/en_US/i/scr/pixel.gif" >
</form>
Sample HTML Code for a Donate Button With a Fixed Contribution Amount
The sample HTML code below illustrates a Donate button where the contribution amount that donors make is fixed and cannot be changed. The code uses the amount and the currency_code variables to set fixed contribution amount at $25.00 USD.
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<!-- Identify your business so that you can collect the payments. -->
<input type="hidden" name="business" value="info@capleswebdev.com">
<!-- Specify a Donate button. -->
<input type="hidden" name="cmd" value="_donations">
<!-- Specify details about the contribution -->
<input type="hidden" name="item_name" value="Friends of the Park">
<input type="hidden" name="item_number" value="Fall Cleanup Campaign">
<input type="hidden" name="amount" value="25.00">
<input type="hidden" name="currency_code" value="USD">
<!-- Display the payment button. -->
<input type="image" name="submit" border="0" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" alt="PayPal - The safer, easier way to pay online">
<img alt="" border="0" width="1" height="1" src="https://www.paypal.com/en_US/i/scr/pixel.gif" >
</form>
Sample URL Code for Donate Email Payment Links
You can write your own URL code for Donate email payment links.
The same variables and values that you include in HTML code for Donate buttons can be used in Donate email payment links. Separate the variables and their values from each other with ampersands (&). Do not enclose values in quotation marks; use plus signs (+) as substitutes for spaces in values, if needed.
You can use the following URL as a starting point for writing your own URL for Donate email payment links.The value for the business variable must match a confirmed email address on file with your PayPal account. You can change the values for other variables.
info@capleswebdev.com
